find group pixel in jpg

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
faustf
Posts: 3
Joined: 2020-01-03T15:57:16-07:00
Authentication code: 1152

find group pixel in jpg

Post by faustf »

hi guys how is possible find a group of pixel , with specific color , inside a jpg ??
thankz at all

User avatar
fmw42
Posts: 26261
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: find group pixel in jpg

Post by fmw42 »

Please explain in more detail. Your question is too short and does not explain very well. Perhaps you want -connected-components. But on a jpg that may have too many colors and thus too many regions for a nominal 16-bit compile of ImageMagick.

Perhaps you can post an example image to some free hosting service and put the URL here. Then provide more explanation.

faustf
Posts: 3
Joined: 2020-01-03T15:57:16-07:00
Authentication code: 1152

Re: find group pixel in jpg

Post by faustf »

example i have a jpg with inside a group of pixel with color blue i want find a area with this color (especially the edges)

snibgo
Posts: 12894
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: find group pixel in jpg

Post by snibgo »

What result do you want? Perhaps an image, a mask of some sort. Or perhaps a list of blue pixels. Or ...

Please post a sample input image.
snibgo's IM pages: im.snibgo.com

faustf
Posts: 3
Joined: 2020-01-03T15:57:16-07:00
Authentication code: 1152

Re: find group pixel in jpg

Post by faustf »

i want search a blue pixel and substitude with pixel not blue but near

snibgo
Posts: 12894
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: find group pixel in jpg

Post by snibgo »

This will change pixels that are exactly blue, to lightblue.

Code: Select all

magick in.jpg -fill lightblue -opaque blue out.jpg
snibgo's IM pages: im.snibgo.com

Post Reply