You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to use pico to find faces on images of arbitrary width/height. I am hoping there is some sort of general rule I can uses for setting the ldim parameter based on image width & height. I have read over the explanation doc https://nenadmarkus.com/p/picojs-intro/
The parameter ldim tells us how to move from one row of the image to the next (known as stride in some other libraries, such as OpenCV).
From what I gather from the examples, it is usually set to the ncols parameter (a.k.a image width). However, I have an example image that is 400x400 pixels. Setting these params:
// where image.width === 400 and image.height === 400constimage={pixels: rgba_to_grayscale(image_data,image_data.height,image_data.width),nrows: image_data.height,ncols: image_data.width,ldim: image_data.width}
This results in zero detections. Setting ldim to the seemingly arbitrary value of 419 results in one detection (which is the desired result). Setting ldim to anything higher results in several detections all correspoding to the same face.
All the other parameters have values taken from examples/image.html ldim: 400 (the image width): ldim: 419 (the desired result): ldim: 420: ldim: 480:
The text was updated successfully, but these errors were encountered:
Hi, I want to use pico to find faces on images of arbitrary width/height. I am hoping there is some sort of general rule I can uses for setting the
ldim
parameter based on image width & height. I have read over the explanation doc https://nenadmarkus.com/p/picojs-intro/From what I gather from the examples, it is usually set to the
ncols
parameter (a.k.a image width). However, I have an example image that is 400x400 pixels. Setting these params:This results in zero detections. Setting
ldim
to the seemingly arbitrary value of419
results in one detection (which is the desired result). Settingldim
to anything higher results in several detections all correspoding to the same face.All the other parameters have values taken from examples/image.html
ldim: 400
(the image width):ldim: 419
(the desired result):ldim: 420
:ldim: 480
:The text was updated successfully, but these errors were encountered: