-
1. Re: check if all pixels are black
c.pfaffenbichler Feb 15, 2010 4:53 AM (in response to Christian Davideck)Histogram doesn't catch single pixels.
How do You arrive at that assumption?
Because as far as I can tell, the Histogram does represent every pixel’s values.
I suppose You might want to ask in the Photoshop Scripting Forum.
-
2. Re: check if all pixels are black
Zeno Bokor Feb 15, 2010 6:33 AM (in response to Christian Davideck)wouldn't it be easier to just fill the layer with black? if you also hold down Shift then it won't alter the transparency of the pixels.
Edit: The number of pixels in a selection is displayed in the Histogram panel. For opacity you can check using Quick Mask mode, no need to make a separate alpha channel
-
3. Re: check if all pixels are black
c.pfaffenbichler Feb 15, 2010 6:34 AM (in response to Zeno Bokor)True that, alt-shift-backspace fills the current layer with the foreground-color and maintains the transparency, if I’m not mistaken.
Edit: That of course is no help regarding the opaque-ness-matter in the original post …
-
4. Re: check if all pixels are black
Zeno Bokor Feb 15, 2010 6:42 AM (in response to c.pfaffenbichler)as for that, Ctrl+click on the layer thumbnail, enter Quick Mask mode, with the Magic Wand set to 0 tolerance and no Anti-Alias select one of the 100% opaque pixels (black pixels while in Quick Mask), invert selection, fill with white, get out of Quick Mask and fill layer with black.
-
5. Re: check if all pixels are black
c.pfaffenbichler Feb 15, 2010 6:46 AM (in response to Zeno Bokor)I would prefer to apply Posterize to the Selection in Quick Mask Mode to avoid having to reset the Magic Wand Tool.
-
6. Re: check if all pixels are black
Christian Davideck Feb 15, 2010 8:34 AM (in response to c.pfaffenbichler)c.pfaffenbichler wrote:
Histogram doesn't catch single pixels.
How do You arrive at that assumption?
by TAFO (try and find out). There is rounding involved in the histogram building of course. (EDIT: I was refering to the histogram graph only. Sorry, in case you were thinking of the same solution as Zeno.)
Zeno Bokor wrote:
wouldn't it be easier to just fill the layer with black?
The keyword here is verify not create.
Zeno Bokor wrote:
The number of pixels in a selection is displayed in the Histogram panel.
Zeno, you are a genius!! This does solve the problem.
I always looked at the info palette, where the max. width and height of the selection is displayed.
Therefore the amount of selected pixels should logically be displayed there, too (all the more so as quite often width*height=amount of selected pixels )
So whereever they are displayed, those attributes should be displayed together.
Thanks again, Zeno!
-
7. Re: check if all pixels are black
c.pfaffenbichler Feb 15, 2010 8:43 AM (in response to Christian Davideck)There is rounding involved in the histogram building of course.
I wonder if You might be confusing the Histogram-display with the Histogram, which indicates the exact number of pixels of values 0 - 255 for each channel or the composite channel (where »rounding« would occur in that it combines three times 256 into 256 steps).
-
8. Re: check if all pixels are black
JimGoshorn Feb 15, 2010 8:43 AM (in response to Christian Davideck)Adding a Threshold layer above the one you are checking and setting it to 1 should show anything that isn't black.
Jim
-
9. Re: check if all pixels are black
Christian Davideck Feb 15, 2010 9:08 AM (in response to c.pfaffenbichler)c.pfaffenbichler wrote:
I wonder if You might be confusing the Histogram-display with the Histogram,
There is a histogram palette which includes the histogram (graph). I am not sure what you are refering to by "Histogram-display".
(PS: in case you don't use the web-interface, I had made an edit to post #6)
c.pfaffenbichler wrote:
which indicates the exact number of pixels of values 0 - 255 for each channel or the composite channel
I know, but I always ignored that approach (for the problem at hand), because I thought it would be too cumbersome to check all 254 values (from 1 to 255) to see if all have 0 occurence. But thinking of that, I just realized that I could simply set a threshold beforehand, so that I would only have to check a single value (255). thank you C.Pfaffenbichler! Sorry, I have only 5 points left to award, but your method does solve the problem equally well as Zeno's approach, so that's a second solution.
c.pfaffenbichler wrote:
where »rounding« would occur in that it combines three times 256 into 256 steps
yes, I was only refering to the (visual) histogram graph. You can have values with "count>0" and they would still not display on the histogram graph.
-
10. Re: check if all pixels are black
Christian Davideck Feb 15, 2010 9:12 AM (in response to JimGoshorn)JimGoshorn wrote:
Adding a Threshold layer above the one you are checking and setting it to 1 should show anything that isn't black. Jim
>>>
Christian Davideck wrote:
I am working on very large images (a multiple of my screen's resolution) on a regular basis and [...] panning/zooming + eye-verification is error-prone and I would need an accurate and precise method.




