Detect coordinates of "colored-blocks" among white baground?
Posted: 2013-03-24T01:31:56-07:00
My first question at imageMagick forum was honestly answered by very kind experts.
I hope my 2nd one will be the same. And once again, please correct me if I say something stupid
My problem was a bit complicated :
I have some colored texts & graphics on white background, like islands over the sea. (Let's suppose that each group of non-white pixels stands one by one - every pix is next to each other is an "ISLAND", and the white background is the SEA)
I need to get all the pixels' coordinates (x,y) of each ISLAND that exisiting on the SEA. Some thing like :
I hope I express my situation well. Please correct me or ask me anything to clarify the question.
Thank you for all suggestions !
PS: I'm working in Windows evironment, and I hope you can help me with cmd command ! Thanks !
I hope my 2nd one will be the same. And once again, please correct me if I say something stupid
My problem was a bit complicated :
I have some colored texts & graphics on white background, like islands over the sea. (Let's suppose that each group of non-white pixels stands one by one - every pix is next to each other is an "ISLAND", and the white background is the SEA)
I need to get all the pixels' coordinates (x,y) of each ISLAND that exisiting on the SEA. Some thing like :
Code: Select all
#island 1 : position(20,30) width:100 height:120 contains 999 pixels :
20,30 : rgba(100,120,220, 15)
...
120,150 : rgba(100,120,221, 20)
#island 2 : position(150,330) width:100 height:120 contains 1200 pixels :
20,30 : rgba(100,120,220, 15)
...
120,150 : rgba(100,120,221, 20)
.... so on
Thank you for all suggestions !
PS: I'm working in Windows evironment, and I hope you can help me with cmd command ! Thanks !