Detect color in composite video

nsaspook

Joined Aug 27, 2009
13,315
I heard it as "Never Twice the Same Color." ;)
That was rather true in the early years, but later on the better TV sets compensated for the color shifts (due to phase shift of the color carrier in transmission) and it generally was not a significant issue.

PAL minimized that problem by alternating the color carrier phase by 180° each line to average out any phase error.
Here, SECAM was referred to as "Something Exceedingly Contrary to the American System" given France's general apparent disdain (at least at that time) for anything American (or NIH) since the PAL system was essentially the American system with one modification (to the color carrier phase).
Nothing has changed, The French today take English technical terms and sent it to some hallowed old man to be converted to a French word that's three times as long.
http://www.frenchtoday.com/blog/learn-some-french-computer-terms
 

Brownout

Joined Jan 10, 2012
2,390
Thanks for your suggestion. Do you think this also work if only a small portion of the image is yellow. Forgot to mention that the yellow part is only about 1-2% of the image.
I don't see why not. Get an older cheap TV or VCR tha has RGB outputs for conecting an external monitor, and you're halfway home. From there, it's a matter of summing R+G, and subtracting B. Or it might be 2*B. Use the summation to "set" a latch.

If this works, ditch the old TV/VCR and build an RGB decoder using any availabe decoder chip.
 

AnalogKid

Joined Aug 1, 2013
11,056
In the 70's the FCC let us add VITS and VIRS, the vertical interval test signal and vertical interval reference signal. The reference signal let TVs self-calibrate to the absolute video level and the absolute color phase. PAL was slightly better in overall signal bandwidth and handled motion better, but had slower frame and field rates so flicker was a bit more noticeable. TV manufacturers compensated for this with slower CRT phosphors.

ak
 

blocco a spirale

Joined Jun 18, 2008
1,546
I don't see why not. Get an older cheap TV or VCR tha has RGB outputs for conecting an external monitor, and you're halfway home. From there, it's a matter of summing R+G, and subtracting B. Or it might be 2*B. Use the summation to "set" a latch.

If this works, ditch the old TV/VCR and build an RGB decoder using any availabe decoder chip.
Could it be as simple as winding a small toroid with primaries between R&B and G&B and with a secondary winding to pick up the induced current pulses due to the differences in levels when yellow is present? Blue would also produce a pulse of similar amplitude but of opposite polarity.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,056
I guess I should be flattered, but I haven't done anything to deserve anything even remotely resembling admiration from anyone.

Truth be told, my knowledge in this area is weak at best. As I recall, we were given an option from my EE instructors circa 1975 to study for the FCC exams; so my knowledge is about as good as some high school student cramming for the SATs. We spent a term studying communications, went to Portland and took the 3rd, 2nd, and 1st class FCC license tests in one sitting. I didn't pass the 1st class test and I never worked in that field; so I've forgotten most of it... My only regrets are that I didn't use that knowledge enough to retain it; and that I let my license expire (I got it before the FCC started issuing lifetime licenses).:(
I went through school working nights at a TV station. While there we took an old RCA VTR junker, kept the transport and motors, and completely rebuilt everything else from the power supplies and motor drive amplifiers and servos to the RF record drivers and preamps with the best of mid-70's ideas. Great project, and eventually it made excellent pictures. As noted, much of that KB is in less demand these days.

Gawd I miss real video.

ak
 

nsaspook

Joined Aug 27, 2009
13,315
I don't see why not. Get an older cheap TV or VCR tha has RGB outputs for conecting an external monitor, and you're halfway home. From there, it's a matter of summing R+G, and subtracting B. Or it might be 2*B. Use the summation to "set" a latch.

If this works, ditch the old TV/VCR and build an RGB decoder using any availabe decoder chip.
Might work in a fashion of you have fast analog hardware detection logic for near bright yellow but would be prone to many false signals for wider detection without some sort of pattern matching. The RGB 8bit space for bright yellow is R255, G255, B0.

http://www.rapidtables.com/web/color/RGB_Color.htm
 

Brownout

Joined Jan 10, 2012
2,390
Might work in a fashion of you have fast analog hardware detection logic for near bright yellow but would be prone to many false signals for wider detection without some sort of pattern matching.
How so? The OP wants to trigger on anythng other than B&W. Actually any detection that senses an imbalance (within limits) would work.
 

nsaspook

Joined Aug 27, 2009
13,315
I thought he said he wanted to detect yellow in video so the devil is in the details of how to screen low levels of yellow in the mix. Saturated yellows might be possible but the hues look to be tricky by just looking at imbalance. I've never build analog based chroma keyer so it might be easy.
 
Last edited:

Brownout

Joined Jan 10, 2012
2,390
I thought he said he wanted to detect yellow in video.
I think he said he wanted to detect color, and presently has yellow.

If he wants to detect color using RGB, this function might work:

Y = sum{ABS(R=G), ABS(G-B), ABS(B-R)}

Output = 1 if Y>Threshold
=0 otherwise

Y is ideally 0, but should be compared to a threshold to prevent falsies from phase errors, etc.

Could it be as simple as winding a small toroid with primaries between R&B and G&B and with a secondary winding to pick up the induced current pulses due to the differences in levels when yellow is present? Blue would also produce a pulse of similar amplitude but of opposite polarity.
I like it. But see my new idea above.
 

nsaspook

Joined Aug 27, 2009
13,315
I think he said he wanted to detect color, and presently has yellow.

If he wants to detect color using RGB, this function might work:

Y = sum{ABS(R=G), ABS(G-B), ABS(B-R)}

Output = 1 if Y>Threshold
=0 otherwise

Y is ideally 0, but should be compared to a threshold to prevent falsies from phase errors, etc.
This is what he said:
I have a composite video signal that is mostly black and white. Once in a while there will appear colors in the video (yellow in this case). I would need to detect when this color appears on screen.
If the ONLY color is yellow then that's just a signal detect of the chroma signal, if there are colors and he wants to detect when that color is yellow that's been the basis for my answers. Maybe he should clarify.
 

AnalogKid

Joined Aug 1, 2013
11,056
I think his wording is a bit ambiguous. To detect any color, a 3.58 MHz tank circuit will extract the chroma subcarrier if there is anything non-mono. Threshold detect that and you're done. OK, almost done. You have to key out the color burst or you will get a false positive every line.

ak
 

RichardO

Joined May 4, 2013
2,270
To detect any color, a 3.58 MHz tank circuit will extract the chroma subcarrier if there is anything non-mono. Threshold detect that and you're done. OK, almost done. You have to key out the color burst or you will get a false positive every line.
This is my thinking as well. If there is no color burst, the TV or video monitor should not produce color. If it does then the TV/monitor is the problem, not the video.

My gut feel is that the small amount of yellow is caused by a CRT with imperfect convergence.
 

Thread Starter

anyh

Joined Sep 3, 2015
6
This is what he said:


If the ONLY color is yellow then that's just a signal detect of the chroma signal, if there are colors and he wants to detect when that color is yellow that's been the basis for my answers. Maybe he should clarify.
It's good enough to detect any color I think. I can't say for sure if the image is truly black and white (grayscale). But for the eye it looks so. This color (that is yellow) is a feature added to the original image. I can't access this point where it's added so I have to recognize the color from composite output only.

Please see attached image for an sample.
 

Attachments

AnalogKid

Joined Aug 1, 2013
11,056
That picture is worth a thousand posts. An artificially generated and keyed-in color box from image recognition software probably is a constant saturation (chroma amplitude) at each instance, so picking it off should be easier than something in the source video that changes with lighting and motion.

Input video buffer > sync tip clamp > H-sync trailing edge detect > chroma burst suppression > medium Q 3.579545 MHz tank > integrator to reduce false alarms > comparator > beeper

or something like that.

ak
 

AnalogKid

Joined Aug 1, 2013
11,056
Pretty much has to be there or the monitor chroma demod has nothing to lock to. Either the color of the boxes would wander around the spectrum, or the monitor would detect lack-of-burst and disable the chroma demod. The latter was a requirement in US TV design to reduce visual noise on screen.

ak
 

ian field

Joined Oct 27, 2012
6,536
I have a composite video signal that is mostly black and white. Once in a while there will appear colors in the video (yellow in this case). I would need to detect when this color appears on screen. Is there a simple circuit to build or some ready made circuit that can detect colors in video signal.

When the color is detected I would like to generate a audio signal. But that part should be easy once the color is detected.

Thanks,
Andreas
A schematic for an S-video converter may help.

I vaguely remember something about the luma and chroma signals coming out on separate pins.

AFAICR: the chroma bit is just the red and blue components - the green is interpolated in the decoder by summing red and blue and subtracting it from luma.
 

The Electrician

Joined Oct 9, 2007
2,970
Pretty much has to be there or the monitor chroma demod has nothing to lock to. Either the color of the boxes would wander around the spectrum, or the monitor would detect lack-of-burst and disable the chroma demod. The latter was a requirement in US TV design to reduce visual noise on screen.

ak
I asked about the burst when there are no boxes.
 
Top