Spliting an image one the basis of color of the line

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Post Reply
shekarnode
Posts: 1
Joined: 2018-03-29T03:07:28-07:00
Authentication code: 1152

Spliting an image one the basis of color of the line

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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
Post Reply