Page 1 of 1
detect border of image
Posted: 2016-08-01T07:26:38-07:00
by vladimircape
I have images, all of them have borders.
borders from left,right,top,bottom size.
And border is simple or is just solid color,
or reflection of part of picture
for example reflection, from the left, it's part of picture 30px from left side of picture
Re: detect border of image
Posted: 2016-08-01T07:33:06-07:00
by Bonzo
You could -trim the image and see if the size changes that would detect the solid colour. If it does not change it must be some other type of border
Re: detect border of image
Posted: 2016-08-01T09:27:42-07:00
by fmw42
Please always provide your IM version and platform, since syntax differs. Also can you post a couple of your images so we can see what type of borders you have and to experiment with solutions. You can post to some free hosting such as dropbox.com and put the URL here.
Please read the top-most topic in this forum at
viewtopic.php?f=1&t=9620
Detecting a constant color is likely pretty simple, but a reflection will be much harder.
Re: detect border of image
Posted: 2016-08-01T12:40:06-07:00
by snibgo
As Fred says, samples would help.
Perhaps all the borders are characterised by a sharp transition that runs most or all the way across the image, so an edge detector might find them.