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

Home » Public Forums » archive » reading pixels from images from automated XYpositions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
reading pixels from images from automated XYpositions [message #39012] Wed, 14 April 2004 09:50
Thomas Nehls is currently offline  Thomas Nehls
Messages: 24
Registered: March 2004
Junior Member
Hi folks,

I want to get information(mean, stddev, median) about the values of
certain pixels(7x7 pixels areas) from an image.
The according XY positions should be read from a file, where a list of
positions is given.

This is, what I thought could work:

> PRO input,x
>
> FOR n=0,x-1 do grey_scale_value,n
> END
>
> PRO grey_scale_value, n,x
> file = DIALOG_PICKFILE(/READ)
> img = READ_TIFF(file)
> positions = DIALOG_PICKFILE(/READ)
> pos =bytarr(3,6)
> pos = READ_SYLK(positions,/ARRAY)
> pixels1 = img[0,23:26,35:38]
> pixels2 = img[0,(pos[1]-3 where pos[0]=n):(pos[1]+3 where pos[0]=n),(pos[2]-3 where pos[0]=n):(pos[2]+3 where pos[0]=n)]
>
> OPENW,1,'greyscale_data.dat',/APPEND
> PRINTF,1, (n+1),mean(pixels2),stddev(pixels2),median(pixels2)
> CLOSE,1
> END

first I tried pixels1, the scheme works, but I think I used the 'where'
command in the wrong way...
Do you have a hint for me?
Thanks
Tom
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: pointers in IDL
Next Topic: Re: How to rebin complex array?

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

Current Time: Fri Oct 10 00:21:31 PDT 2025

Total time taken to generate the page: 0.31792 seconds