|
Re: How to display two images using tvscl [message #65144 is a reply to message #65039] |
Thu, 12 February 2009 12:20  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
frankosuna writes:
> I do have the arrays for the images as well.
OK, then! What do they look like. Are they 2D
arrays? Did you load a particular color table
to display them?
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: How to display two images using tvscl [message #65146 is a reply to message #65039] |
Thu, 12 February 2009 12:15  |
frankosuna
Messages: 31 Registered: February 2008
|
Member |
|
|
On Feb 12, 7:12 am, David Fanning <n...@dfanning.com> wrote:
> frankosuna writes:
>> I have two .dat files which I suppose is a binary image files. I
>> create them the following way:
>
>> image = TVRead(Filename='edgeDetect',/NODIALOG,/BMP)
>
> It is right about here that things begin to go South
> for you. :-)
>
> What I would be interested in is what do you have
> *before* you capture nothing but color information
> out of the graphics window. I would prefer to deal
> with the things you put *into* the graphics window.
>
>> image = READ_BMP('/home/users/fjosuna/CASVU_ISS/edgeDetect.bmp')
>> OPENW, lun, 'edgeDetect.dat', /GET_LUN
>> WRITEU, lun, image
>> FREE_LUN, lun
>
>> ERASE
>
>> tvscl, congrid(realImage, 1024, 1024)
>
> This command is almost guaranteed to screw up your colors for
> you big time! There is only one hard and fast rule in IDL:
> If you care about colors in an image don't ever, under any
> circumstances, use TVSCL to display it. (I guess the other
> rule is "Don't ever let me catch you using HEAP_GC," but
> the TVSCL rule is only slightly behind it in importance.)
>
> When you have a 24-bit image, all you have is colored pixels.
> If you change *any* of those pixels, then you no longer
> have the same colors!
>
> But I really don't want to work with 24-bit images at
> all. It just makes what you are trying to do EXTREMELY
> complicated. Don't you have a couple of 2D arrays we
> can work with?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
I do have the arrays for the images as well.
|
|
|
Re: How to display two images using tvscl [message #65154 is a reply to message #65039] |
Thu, 12 February 2009 06:12  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
frankosuna writes:
> I have two .dat files which I suppose is a binary image files. I
> create them the following way:
>
> image = TVRead(Filename='edgeDetect',/NODIALOG,/BMP)
It is right about here that things begin to go South
for you. :-)
What I would be interested in is what do you have
*before* you capture nothing but color information
out of the graphics window. I would prefer to deal
with the things you put *into* the graphics window.
> image = READ_BMP('/home/users/fjosuna/CASVU_ISS/edgeDetect.bmp')
> OPENW, lun, 'edgeDetect.dat', /GET_LUN
> WRITEU, lun, image
> FREE_LUN, lun
>
> ERASE
>
> tvscl, congrid(realImage, 1024, 1024)
This command is almost guaranteed to screw up your colors for
you big time! There is only one hard and fast rule in IDL:
If you care about colors in an image don't ever, under any
circumstances, use TVSCL to display it. (I guess the other
rule is "Don't ever let me catch you using HEAP_GC," but
the TVSCL rule is only slightly behind it in importance.)
When you have a 24-bit image, all you have is colored pixels.
If you change *any* of those pixels, then you no longer
have the same colors!
But I really don't want to work with 24-bit images at
all. It just makes what you are trying to do EXTREMELY
complicated. Don't you have a couple of 2D arrays we
can work with?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|