question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] Support for binary buffers in loadImage

See original GitHub issue

Hi. I don’t know if it’s possible to add support for buffers in loadImage or some new function. I’ve looked through the code and it seems that files reading is handled inside dlib and I didn’t find any easy way to do a quick PR.

This feature could be utilized in cases when images are stored not on disk (so previously you will get them from somewhere) or images could be preprocessed. So, in this case, they will be loaded into memory as Buffer and storing them to disk and then performing cleanup will add unnecessary overhead.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SkeLLLacommented, Mar 21, 2018

@justadudewhohacks, thanks. I just used pure opencv4nodejs and CascadeClassifier. And it worked with buffers. And face-recognition.js face detector seems working much slower than opencv’s. So anyway the last solution satisfied all my needs.

As I said, I’ve looked through dlib sources and didn’t find a way to use buffers, just thought maybe I’ve missed something.

Thanks for help.

0reactions
justadudewhohackscommented, Mar 22, 2018

Ok. Yes face detection with opencv is way faster but not as stable. If that’s applicable for you and don’t need face recognition, then I would stick with opencv4nodejs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to load an image from url into buffer in nodejs
I am u using the ExifImage project below to get the exif info and according to their documentation: "Instead of providing a filename...
Read more >
Image Module - Pillow (PIL Fork) 9.3.0 documentation
Creates a copy of an image memory from pixel data in a buffer. In its simplest form, this function takes three arguments (mode,...
Read more >
How to decode a binary buffer to an image in node.js?
Solution 1. let binary = Buffer. from(data); //or Buffer. from(data, 'binary') let imgData = new Blob(binary.
Read more >
jimp - npm
Supported types: ... To do this Jimp exposes the static function ... A PNG, JPEG or BMP binary Buffer of an image (e.g....
Read more >
PXIPL™ Image Processing Library - EPIX, Inc.
Color pixels, in either RGB, YCrCb, or HSB color space, with a range of 1 to 16 bits per color component, are supported....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found