Replacing special type of pixel with RGB parameters

N
Posted By
ngonzalez
Mar 9, 2005
Views
386
Replies
4
Status
Closed
Hi:

I’m working with these images and I have to remove only the pixels in which the blue rgb values is less than .9 the red RGB and green value. After I have detected all of the pixels that meet this condition I want to replace them with black. First of all I want to know if it is possible for photoshop to make this type of decision making process and then how do I select those pixels and replace or remove them. I have tried using the selecting a particular blue color to remove it but It does not get the trick done. I have been able to implement this in python but I want to know if it is possible photoshop. I have photoshop CS. If you can referred me to another source of information that you think deals with this issue. I will be very gratefully.

Example RGB(0,0,255) : 255 > .9*0 and 255 > .9*0 This pixel would be chosen.
RGB(35,45,25): 25 > .9*35 and 25 > .9*45 This pixel would not be chosen.

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

P
paul
Mar 9, 2005
wrote:

Hi:

I’m working with these images and I have to remove only the pixels in which the blue rgb values is less than .9 the red RGB and green value. After I have detected all of the pixels that meet this condition I want to replace them with black. First of all I want to know if it is possible for photoshop to make this type of decision making process and then how do I select those pixels and replace or remove them. I have tried using the selecting a particular blue color to remove it but It does not get the trick done. I have been able to implement this in python but I want to know if it is possible photoshop. I have photoshop CS. If you can referred me to another source of information that you think deals with this issue. I will be very gratefully.

Example RGB(0,0,255) : 255 > .9*0 and 255 > .9*0 This pixel would be chosen.
RGB(35,45,25): 25 > .9*35 and 25 > .9*45 This pixel would not be chosen.

Maybe something along the lines of setting up layers with blue & red channels only and different overlay modes (normal, difference, etc).
R
RSD99
Mar 9, 2005
I think that you would probably have better luck using an Image Processing program.

I’m not really familiar with that field, but one option that actually works within PhotoShop is Fovea Pro, and another option(s) would include the "Image Processing Toolkit" … both by Reindeer Graphics http://www.reindeergraphics.com/products.shtml

Another option might be NIH’s image processing application … it is primarily available for the MAC, but a Windows port is also available from a third party vendor. See
http://rsb.info.nih.gov/nih-image/

A Java language adaptation of the NIH program is ImageJ … which includes a Windows installer, and will work on any version of windows later than Windows 95 … see
http://rsb.info.nih.gov/ij/

See also
http://www.nist.gov/lispix/imlab/labs.html
http://www.mwrn.com/guide/image/analysis.htm
http://ddsdx.uthscsa.edu/dig/sites.html
http://www.efg2.com/Lab/Library/ImageProcessing/SoftwarePack ages.htm http://people.westminstercollege.edu/faculty/rerickson/300ng /ImageProcessin
g.html

wrote in message
Hi:

I’m working with these images and I have to remove only the pixels in which the blue rgb values is less than .9 the red RGB and green value. After I have detected all of the pixels that meet this condition I want to replace them with black. First of all I want to know if it is possible for photoshop to make this type of decision making process and then how do I select those pixels and replace or remove them. I have tried using the selecting a particular blue color to remove it but It does not get the trick done. I have been able to implement this in python but I want to know if it is possible photoshop. I have photoshop CS. If you can referred me to another source of information that you think deals with this issue. I will be very gratefully.

Example RGB(0,0,255) : 255 > .9*0 and 255 > .9*0 This pixel would be chosen.
RGB(35,45,25): 25 > .9*35 and 25 > .9*45 This pixel would not be chosen.
M
Mike
Mar 9, 2005
In article <1110378468.630250.284540
@o13g2000cwo.googlegroups.com>,
says…
Hi:

I’m working with these images and I have to remove only the pixels in which the blue rgb values is less than .9 the red RGB and green value. After I have detected all of the pixels that meet this condition I want to replace them with black. First of all I want to know if it is possible for photoshop to make this type of decision making process and then how do I select those pixels and replace or remove them. I have tried using the selecting a particular blue color to remove it but It does not get the trick done. I have been able to implement this in python but I want to know if it is possible photoshop. I have photoshop CS. If you can referred me to another source of information that you think deals with this issue. I will be very gratefully.

Example RGB(0,0,255) : 255 > .9*0 and 255 > .9*0 This pixel would be chosen.
RGB(35,45,25): 25 > .9*35 and 25 > .9*45 This pixel would not be chosen.
It would be easy with the Filter Factory plug-in – but that seems to be hard to find these days.

This should work though.

1) Create copies of the red, green, and blue channels as layers. Lets call them r, g, and b. They
should look like grey-scale images.
2) Now woth layer r, go into image/adjust/levels and set the right hand number in "Output levels"
to a value of 229. This should lighten the red. Repeat the process with the g layer.
3) Duplicate each of these layers and arrange them in
order from the top r,b,r,g,b,g,background,
where background is the original (full colour image).
4) Turn on the top three layers (the r,b,r set) and set the bottom to normal, the middle to lighten
and the top to difference
5) Add a levels adjustment layer above the three visible layers and set the righthand most of the three
"input levels" to 2.
6) go to Layers/ merge visible and merge the three
levels and the adjustment layer. Call it ‘r-b’
7) Repeat steps 4 to 6 with the g,b,g set of layers. Cal this one ‘g-b’.
8) Turn on rb and rg with the top one in darken mode and thebottom one in normal mode. then merge these
two layers into a single one using layers / merge visible again. call it rg-b
9) turn on the background layer, and set the rg-b layer in darken mode. – you should now have
the effect you required, if you followed everything to the letter.

Mike.
M
Mike
Mar 9, 2005
In article ,
says…
In article <1110378468.630250.284540
@o13g2000cwo.googlegroups.com>,
says…
Hi:

I’m working with these images and I have to remove only the pixels in which the blue rgb values is less than .9 the red RGB and green value. After I have detected all of the pixels that meet this condition I want to replace them with black. First of all I want to know if it is possible for photoshop to make this type of decision making process and then how do I select those pixels and replace or remove them. I have tried using the selecting a particular blue color to remove it but It does not get the trick done. I have been able to implement this in python but I want to know if it is possible photoshop. I have photoshop CS. If you can referred me to another source of information that you think deals with this issue. I will be very gratefully.

Example RGB(0,0,255) : 255 > .9*0 and 255 > .9*0 This pixel would be chosen.
RGB(35,45,25): 25 > .9*35 and 25 > .9*45 This pixel would not be chosen.
It would be easy with the Filter Factory plug-in – but that seems to be hard to find these days.

This should work though.

1) Create copies of the red, green, and blue channels as layers. Lets call them r, g, and b. They
should look like grey-scale images.
2) Now woth layer r, go into image/adjust/levels and set the right hand number in "Output levels"
to a value of 229. This should lighten the red. Repeat the process with the g layer.
3) Duplicate each of these layers and arrange them in
order from the top r,b,r,g,b,g,background,
where background is the original (full colour image).
4) Turn on the top three layers (the r,b,r set) and set the bottom to normal, the middle to lighten
and the top to difference
5) Add a levels adjustment layer above the three visible layers and set the righthand most of the three
"input levels" to 2.
6) go to Layers/ merge visible and merge the three
levels and the adjustment layer. Call it ‘r-b’
7) Repeat steps 4 to 6 with the g,b,g set of layers. Cal this one ‘g-b’.
8) Turn on rb and rg with the top one in darken mode and thebottom one in normal mode. then merge these
two layers into a single one using layers / merge visible again. call it rg-b
9) turn on the background layer, and set the rg-b layer in darken mode. – you should now have
the effect you required, if you followed everything to the letter.
One small error – the above will turn pixels where b is less than 0.9*r and 0.9*g to black. To get the propper effect you want you need to invert the rg-b layer between steps 9) and 10).

Good luck,

Mike.

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections