comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » joining images into a colored one
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
joining images into a colored one [message #94509] Thu, 15 June 2017 04:18 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Hi,
I couldn't find anything on this in previous posts, but I think (hope) that there's an easy solution to it.
I want to create a colored image out of a subset of images that are "labelled regions", that is:
image[0] has patches with values 1l, zero otherwise.
image[1] has patches with values 2l, zero otherwise.
...and so on

Typically I'm dealing with n images, where n<10. Fortunately, all images have the same dimensions.
I want to join the images so that the color o each [i,j] pixel is dependent on which and how many images (from the subset) had this value different from zero.
Example:
[i0,j0] is only different from zero in image[0], so it will be, e.g., red.
[i1,j1] is only different from zero in image[1], so it will be, e.g., blue.
[i1,j1] is different from zero only in image[0] and image[1], so it will be, red+blue=magenta.

I know how to handle the pixels, any clue how to programmatically handle the colors?

[I was thinking of using something like number conversion from basis-to-basis. That is if I have n images, I will assign to each pixel the following value:
[i,j] = image_0[i,j]*n^0 + image_1[i,j]*n^1 + image_2[i,j]*n^2 +... and then use a long number for indexing colors (24-bit)... but I think/hope that there is a nicer/cleaner way of doing this]

Thanks,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: *** Error: checking data fill: tried to move past end of file
Next Topic: ROI Data Retrival

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:48:24 PDT 2025

Total time taken to generate the page: 0.00530 seconds