Re: How to display two images using tvscl [message #65163 is a reply to message #65023] |
Wed, 11 February 2009 17:52  |
frankosuna
Messages: 31 Registered: February 2008
|
Member |
|
|
On Feb 9, 10:19 pm, David Fanning <n...@dfanning.com> wrote:
> frankosuna writes:
>> For some reason the color scheme is completely different.
>> The support image color is changed as well as the color
>> of the edge detected image(supposed to be white).
>
> Well, it looks to me like those images are 24-bit JPEGs.
> That is going to make things very difficult. Did the data
> *come* that way, or did you make those images JPEGs for some
> reason?
>
> It is *much* harder to do something sensible with color
> pixels than it is to work with data pixels. Then, the two
> images I downloaded from your URLs were different sizes.
> Sigh...
>
> Is this *really* what we have to work with?
>
> Give me some good news and maybe we can sort this out
> for you. :-)
>
> 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 have two .dat files which I suppose is a binary image files. I
create them the following way:
image = TVRead(Filename='edgeDetect',/NODIALOG,/BMP)
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)
image = TVRead(Filename='realImage',/NODIALOG,/BMP)
image = READ_BMP('/home/users/fjosuna/CASVU_ISS/realImage.bmp')
OPENW, lun, 'realImage.dat', /GET_LUN
WRITEU, lun, image
FREE_LUN, lun
ERASE
The first one is the edge detected file and the second is the image
that edge
detection was performed on. They both should be 1024x1024 images.
I then want to display the real image first and on top the edge
detected image
which I do like this:
; Create a window and display the image.
WINDOW, 0, XSIZE = dims[0], YSIZE = dims[1], $
TITLE = 'Click on an Edge to navigate on.'
;TVSCL, congrid(realImage,dims[0],dims[1])
;Loadct, 0, NCOLORS=128
;LoadCT, 2, NCOLORS=128, BOTTOM=128
TVSCL, Bytscl(realImage, TOP=127) + $
Bytscl(img,TOP=127)
Both files realImage and img are the bmp files for the edge detected
image and
the real image.
|
|
|