[feature] Support for binary buffers in loadImage
See original GitHub issueHi. 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:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
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.