如何在 photoshp 中隔离一定长度的连续像素?

如何在 photoshp 中隔离一定长度的连续像素?

我正在尝试隔离水平、垂直或对角线相邻的像素(最好具有指定的长度)。我正在处理的图像没有已知的模式(图像)。有没有办法可以移除孤立像素或突出显示像素线?

答案1

答案已发布在这里: https://community.adobe.com/t5/photoshop/how-to-remove-detect-lone-pixels/mp/10971705?page=1#M313346

• duplicate the Layer thrice,

• move one copy 1 px to the right,

• aother 1 px down, 

• convert the three Layers to a Smart Object, 

• Layer > Smart Objects > Stack Mode > Median, 

• Filter > Other > Minimum aith 1px and Roundness, 

• set the Smart Object’s Blend Mode to Screen. 
If you have black(gray\color) pixels and absolute white backgound then you can do this.

Make two copies of the original layer.



Apply to one of the copies Custom Filter

0 0 0 0 0
0 1 1 1 0
0 1 0 1 0
0 1 1 1 0
0 0 0 0 0
scale: 8 offset: 0



Using magic wand with

tol = 0, antial = off, cont = off

select white (255,255,255) on this layer.
If it's hard to find white, find a single pixel on the original, it will definitely turn white.



Turn off \ delete this layer. Switch to another copy. Fill the selection with white.
You can check the result by putting the layer to Difference blend mode or turning layer on\off.


Pixels at the very edges are not deleted. It is necessary to expand the canvas by 1 pixel at least with white filling.



UPD. To increase accuracy, you can replace in filter 1 with 256, and in scale 8 with 2048.

相关内容