compare -metric rsme -subimage search oddity
Posted: 2013-05-29T15:57:17-07:00
Can someone explain why the following occurs?
compare -metric rmse -subimage-search A.bmp B.bmp C.bmp
Where A.bmp is 175x335 pixels (114 dpi) and B.bmp is 16x16 pixels (114dpi)
We expect 2 output files, and find:
C-0.bmp (size 175x335)
C-1.bmp (size 160x320) ??
I would have expected C-1.bmp to be 175x335 pixels, so why is it smaller? Is this because we are only comparing 1/2 of the B.bmp file at the edges of A.bmp? Notice that the size is approximately size A - size B.
How can I get C-1.bmp to properly remap to the original 175x335 size of A.bmp image? In other words, I need the exact pixel locations to match. I assume that C-1.bmp got trimmed about 8 units all around each edge.
Later on I do some HMT kernal work and will need exact pixel alignment. Is there an easy way to add back a gray scale 8 pixel border to C-1.bmp so it resumes the original 175x335 pixel size?
Thanks for your help, I just discovered this problem when doing some image scanning work with a Macro Editor.
Randall
compare -metric rmse -subimage-search A.bmp B.bmp C.bmp
Where A.bmp is 175x335 pixels (114 dpi) and B.bmp is 16x16 pixels (114dpi)
We expect 2 output files, and find:
C-0.bmp (size 175x335)
C-1.bmp (size 160x320) ??
I would have expected C-1.bmp to be 175x335 pixels, so why is it smaller? Is this because we are only comparing 1/2 of the B.bmp file at the edges of A.bmp? Notice that the size is approximately size A - size B.
How can I get C-1.bmp to properly remap to the original 175x335 size of A.bmp image? In other words, I need the exact pixel locations to match. I assume that C-1.bmp got trimmed about 8 units all around each edge.
Later on I do some HMT kernal work and will need exact pixel alignment. Is there an easy way to add back a gray scale 8 pixel border to C-1.bmp so it resumes the original 175x335 pixel size?
Thanks for your help, I just discovered this problem when doing some image scanning work with a Macro Editor.
Randall