its possible convert image rgb to YIQ for obtain results like this post?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

its possible convert image rgb to YIQ for obtain results like this post?

Post by diegomage »

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

Re: its possible convert image rgb to YIQ for obtain results like this post?

Post by fmw42 »

You can emulate that code using -color-matrix.

Input:
Image

Code: Select all

convert peppers_tiny.png -color-matrix \
" \
0.299 0.587 0.114 \
0.596 -0.274 -0.322 \
0.211 -0.523 0.312 \
" \
peppers_tiny_yiq.png
Image


Here is an sRGB to YIQ transformation, showing the YIQ as if RGB:

Code: Select all

convert peppers_tiny.png -colorspace YIQ -separate \
-set colorspace sRGB -combine peppers_tiny_yiq2.png
Image

Here is the same but swapping the first two channels:

Code: Select all

convert peppers_tiny.png -colorspace YIQ -separate \
-swap 0,1 -set colorspace sRGB -combine peppers_tiny_yiq3.png
Image
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: its possible convert image rgb to YIQ for obtain results like this post?

Post by diegomage »

very thankyou for your help :)
Post Reply