saturated pixels

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

saturated pixels

shilo2
Dear list members

In order to produce radiometric images I would like initially to delete saturated pixels from the images. For that purpose (and after searching the database) I was thinking to duplicate the image and threshold it to the maximum values and then to subtract this image from the original one. The problem is that the original file is scaled from 0 -4095 (comes from the confocal) and the new tresholded image is scaled from 0-255.

Any help for how to solve this problem or any other suggestions for how to ignore saturated values will be appreciated.

Thanks
Shilo
Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

John Alexander-7
I've done something similar.
Crudely, here was my approach.
Duplicate the image, threshold it to the maximum values.
invert the image so now all "non-thresholded" pixels have a value of 255
and all thresholded pixels have a value of 0.
then divide that image by 255 - so it is now binary 0's and 1's.
multiply that image with the original.
All thresholded pixels will be multiplied by 0 while all others by 1.

John


shilo2 wrote:

> Dear list members
>
> In order to produce radiometric images I would like initially to delete
> saturated pixels from the images. For that purpose (and after searching the
> database) I was thinking to duplicate the image and threshold it to the
> maximum values and then to subtract this image from the original one. The
> problem is that the original file is scaled from 0 -4095 (comes from the
> confocal) and the new tresholded image is scaled from 0-255.
>
> Any help for how to solve this problem or any other suggestions for how to
> ignore saturated values will be appreciated.
>
> Thanks
> Shilo
>

--
John K. Alexander, Ph.D.
Post-Doctoral Fellow
William Green Laboratory
University of Chicago
Dept. Neurobiology, Pharmacology, and Physiology
947 East 58th Street
Abott Hall 402
Chicago, IL 60637
(off) 773-702-9386
(fax) 773-702-3774
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

shilo2
Thank you John
 
it works very good for me
 
Shilo

On Sun, Nov 30, 2008 at 10:16 AM, John Alexander-7 (via Nabble) <[hidden email]> wrote:
I've done something similar.
Crudely, here was my approach.
Duplicate the image, threshold it to the maximum values.
invert the image so now all "non-thresholded" pixels have a value of 255
and all thresholded pixels have a value of 0.
then divide that image by 255 - so it is now binary 0's and 1's.
multiply that image with the original.
All thresholded pixels will be multiplied by 0 while all others by 1.

John


shilo2 wrote:

> Dear list members
>
> In order to produce radiometric images I would like initially to delete
> saturated pixels from the images. For that purpose (and after searching the
> database) I was thinking to duplicate the image and threshold it to the
> maximum values and then to subtract this image from the original one. The
> problem is that the original file is scaled from 0 -4095 (comes from the
> confocal) and the new tresholded image is scaled from 0-255.
>
> Any help for how to solve this problem or any other suggestions for how to
> ignore saturated values will be appreciated.
>
> Thanks
> Shilo
>

--
John K. Alexander, Ph.D.
Post-Doctoral Fellow
William Green Laboratory
University of Chicago
Dept. Neurobiology, Pharmacology, and Physiology
947 East 58th Street
Abott Hall 402
Chicago, IL 60637
(off) 773-702-9386
(fax) 773-702-3774
jalexand@...



This email is a reply to your post @ http://n2.nabble.com/saturated-pixels-tp1594574p1594630.html
You can reply by email or by visting the link above.


Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

Gabriel Landini
In reply to this post by John Alexander-7
On Sunday 30 November 2008, John Alexander wrote:
> Crudely, here was my approach.
> Duplicate the image, threshold it to the maximum values.
> invert the image so now all "non-thresholded" pixels have a value of 255
> and all thresholded pixels have a value of 0.

However:
> then divide that image by 255 - so it is now binary 0's and 1's.
> multiply that image with the original.
> All thresholded pixels will be multiplied by 0 while all others by 1.

you can do the same in only 1 step by using the AND operation:

thresholded AND original

All the 255 values in the thresholded image will contain the "original" while
the "0" pixels will not.

G
Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

shilo2
hi Gabriel


I couldn't find this AND operation

Shilo


On Sun, Nov 30, 2008 at 11:57 AM, Gabriel Landini <[hidden email]>wrote:

> On Sunday 30 November 2008, John Alexander wrote:
> > Crudely, here was my approach.
> > Duplicate the image, threshold it to the maximum values.
> > invert the image so now all "non-thresholded" pixels have a value of 255
> > and all thresholded pixels have a value of 0.
>
> However:
> > then divide that image by 255 - so it is now binary 0's and 1's.
> > multiply that image with the original.
> > All thresholded pixels will be multiplied by 0 while all others by 1.
>
> you can do the same in only 1 step by using the AND operation:
>
> thresholded AND original
>
> All the 255 values in the thresholded image will contain the "original"
> while
> the "0" pixels will not.
>
> G
>
Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

Gabriel Landini
On Sunday 30 November 2008, shay ros wrote:
> hi Gabriel
>
>
> I couldn't find this AND operation

Hi

Process>Image Calculator, then look for AND in the operation list.

G
Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

shilo2
Thanks
Shilo

On Sun, Nov 30, 2008 at 12:19 PM, Gabriel Landini <[hidden email]>wrote:

> On Sunday 30 November 2008, shay ros wrote:
> > hi Gabriel
> >
> >
> > I couldn't find this AND operation
>
> Hi
>
> Process>Image Calculator, then look for AND in the operation list.
>
> G
>
Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

John Alexander-7
I recall trying that and I had problems when performing this operation
between 8 and 16-bit images.  It seemed to me that when I used AND, it
performed the logic operation with 0000000011111111 (255)
so instead of figuring out what I did wrong I just performed the less
elegant solution.



shay ros wrote:

> Thanks
> Shilo
>
> On Sun, Nov 30, 2008 at 12:19 PM, Gabriel Landini <[hidden email]>wrote:
>
>> On Sunday 30 November 2008, shay ros wrote:
>>> hi Gabriel
>>>
>>>
>>> I couldn't find this AND operation
>> Hi
>>
>> Process>Image Calculator, then look for AND in the operation list.
>>
>> G
>>
>

--
John K. Alexander, Ph.D.
Post-Doctoral Fellow
William Green Laboratory
University of Chicago
Dept. Neurobiology, Pharmacology, and Physiology
947 East 58th Street
Abott Hall 402
Chicago, IL 60637
(off) 773-702-9386
(fax) 773-702-3774
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

Gabriel Landini
On Sunday 30 November 2008, John Alexander wrote:
> I recall trying that and I had problems when performing this operation
> between 8 and 16-bit images.  It seemed to me that when I used AND, it
> performed the logic operation with 0000000011111111 (255)
> so instead of figuring out what I did wrong I just performed the less
> elegant solution.

Ah, yes, if one mixes bit depths the results will not be correct, and your
earlier suggestion would be appropriate.

G
Reply | Threaded
Open this post in threaded view
|

Re: saturated pixels

John Alexander-7
So now that you mention it - I think my final solution was to mask the
image, convert to 16-bit, then multiply by a large number, then perform
the AND operation.



Gabriel Landini wrote:

> On Sunday 30 November 2008, John Alexander wrote:
>> I recall trying that and I had problems when performing this operation
>> between 8 and 16-bit images.  It seemed to me that when I used AND, it
>> performed the logic operation with 0000000011111111 (255)
>> so instead of figuring out what I did wrong I just performed the less
>> elegant solution.
>
> Ah, yes, if one mixes bit depths the results will not be correct, and your
> earlier suggestion would be appropriate.
>
> G
>

--
John K. Alexander, Ph.D.
Post-Doctoral Fellow
William Green Laboratory
University of Chicago
Dept. Neurobiology, Pharmacology, and Physiology
947 East 58th Street
Abott Hall 402
Chicago, IL 60637
(off) 773-702-9386
(fax) 773-702-3774
[hidden email]