How to detect amount of pixels of some color in area?
Posted: 2016-05-29T11:25:48-07:00
Is there a way how to do the following in IM 6.7.5-1 2012-01-28 Q8?
When I have image with some lines like this:
I would like to detect places where the lines are crossed. To be more exact, I am not interested in the places which are crossed...
This is related to my previous thread viewtopic.php?f=1&t=29790&p=133933#p133933 (I asked how to get pixels from some specific area in the image; the area is defined by coordinates). Now, if it is possible to detect the places where is bigger dencity of blue pixels by converting image like this:
You should see that the area where the lines are crossed are slightly more red than the next parts.
Then I would select the place where the colors are acumulated:
(I had to enlarge the image coz the colors were not saved in low resolution)
Then I expand the selection and just delete it
and finally I want to keep the previous task with color selection, (but this time different color). So in the result I will have this:
Which is near location where I originally clicked on a blue line.
To sum it up:
My goel is to get certain part of image based on coordinate, as I asked in previous thread,
and then to remove the places where the pixels are accumulated. Then repeat the previous to get the part of line. My target is to get mask, not the original color.
When I have image with some lines like this:
I would like to detect places where the lines are crossed. To be more exact, I am not interested in the places which are crossed...
This is related to my previous thread viewtopic.php?f=1&t=29790&p=133933#p133933 (I asked how to get pixels from some specific area in the image; the area is defined by coordinates). Now, if it is possible to detect the places where is bigger dencity of blue pixels by converting image like this:
You should see that the area where the lines are crossed are slightly more red than the next parts.
Then I would select the place where the colors are acumulated:
(I had to enlarge the image coz the colors were not saved in low resolution)
Then I expand the selection and just delete it
and finally I want to keep the previous task with color selection, (but this time different color). So in the result I will have this:
Which is near location where I originally clicked on a blue line.
To sum it up:
My goel is to get certain part of image based on coordinate, as I asked in previous thread,
and then to remove the places where the pixels are accumulated. Then repeat the previous to get the part of line. My target is to get mask, not the original color.