Page 1 of 1

Spliting an image one the basis of color of the line

Posted: 2018-03-29T03:34:04-07:00
by shekarnode
Hello ImageMagick community,
I want to split an image on the basis of color of the line.

I'm using hough line detector to detect a line and mark it with red color.

Image

Now,i want to split the image on the basis of line which has been overlayed using line detection algorithm.

Thanks and regards
shekar

Re: Spliting an image one the basis of color of the line

Posted: 2018-03-29T08:45:05-07:00
by fmw42
Why don't you just use the hough line average y coordinates (extrapolated to the left and right sides of the image) to crop the image into two parts?

Alternately, average the image to one column and search the image color and coordinates to find the y value of the red pixel in the column. Then crop into top and bottom parts. See https://stackoverflow.com/questions/495 ... 1#49561301