Hello,
have a problem with my job production.
sometime my system missing an object:
in left side of posted image, you can see that miss something....
Now i'm earching a solution, to detect when my system fail, and allert user.
I think to 'measure' distance from upper border and first point not 'blank' [white] :
if this value is higher than given value, error occours.
Any help, or idea to solve this ?
thank you for any help,
m.
'Measure' distance to find missing object
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: 'Measure' distance to find missing object
Split the image into left and right halves and use -white-threshold to make sure that the white is pure white. For each side average the image down to one column (see -scale). Then convert to txt format and search the text results until you do not get a white value. Note the y coordinate.
see
http://www.imagemagick.org/script/comma ... 3d9l4#crop
http://www.imagemagick.org/Usage/crop/#crop
http://www.imagemagick.org/script/comma ... -threshold
http://www.imagemagick.org/Usage/files/#txt
see
http://www.imagemagick.org/script/comma ... 3d9l4#crop
http://www.imagemagick.org/Usage/crop/#crop
http://www.imagemagick.org/script/comma ... -threshold
http://www.imagemagick.org/Usage/files/#txt