Thank you, fmw42 and snibgo.
White being 1.0 and black 0.0,
`convert file1.bmp -fx "p[0,0]||((p[-1,0]+...+p[-1,-1])>5.1)" file2.bmp'
does what I meant.
The 3x3 window approach does not let treat the centre differently, does it?
And, if it does not, polygonal concavities make things difficult.
Search found 2 matches
- 2017-08-29T17:41:56-07:00
- Forum: Users
- Topic: Using -fx on a bilevel image
- Replies: 3
- Views: 3560
- 2017-08-29T16:21:40-07:00
- Forum: Users
- Topic: Using -fx on a bilevel image
- Replies: 3
- Views: 3560
Using -fx on a bilevel image
I am trying to turn white those black pixels of a bilevel image
that have less than 3 black neighbours. The original image is
predominantly white. At least two things do not work as expected.
(1)
`convert file1.bmp -fx "p[0,0]&&((p[-1,0]+...+p[-1,-1])>2.7)" file2.bmp'
works long and turns several ...
that have less than 3 black neighbours. The original image is
predominantly white. At least two things do not work as expected.
(1)
`convert file1.bmp -fx "p[0,0]&&((p[-1,0]+...+p[-1,-1])>2.7)" file2.bmp'
works long and turns several ...