If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Registered Member #1062
Joined: Tue Oct 16 2007, 02:01AM
Location:
Posts: 1529
I have a camera module, and it outputs 60Hz Analog Composite Video. I tested this with the Yellow RCA connector on a TV, and it works great. How would I go about digitizing this? My micro-controller has an integrated ADC (Mbed), so I can stream this info to the computer. How would i go about "interpreting" this? Is there a library to take in the raw numbers and output an image?
The module also has YUV connections. There are 8 pins for the Y data, and 8 pins for the UV data. How do I actually read this? Is each pin another pixel, sent in sets of 8 pixels? Or is it something else?
I am hoping to process this on an XMOS board (XC-1A), and output Serial data for wireless transmission.
The Spec sheet for the camera module is attached. ]c3188a.pdf[/file]
Registered Member #27
Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
Y is brightness, U and V are colour components, since the eye and brain has a lower spatial resolution for colour than brightness they save pins and space by sending the colour in lower resolution. That is why one bus is named UV, it alternates between U and V data.
The XMOS should be fast enough to capture the information in real time if you have enough RAM to store it.
All the information is in the datasheet for the sensor:
You can also grab the composite video signal if you have a fast enough A/D converter (a few MHz to get a good picture, 9 MHz for full VGA resolution). It should not take a lot of code if you know the details about video signal timing.
Registered Member #30
Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
The YUV thing is a parallel bus. For each pixel it spits out 8 bits of Y (the luminance value, which is just the brightness of the pixel as an 8-bit number) and 8 bits of UV which is the colour information.
U and V are two separate colour difference signals, and it's not obvious from the datasheet how they come out of a single 8-bit port. I'd guess that they're subsampled so you get U for one pixel and V for the next. If you just want a B&W image you can use the Y port and ignore the UV.
Registered Member #2140
Joined: Tue May 26 2009, 09:16PM
Location:
Posts: 53
Ok, so was reading the datasheet, specifically page 13. This is what i got that i should do from it:
1)Wait for VSYNC to go high. This says a new image is starting. 2)Wait until HREF is high. While high, read Y data every-time PCLK goes high (or low?). Increment Y axis everytime. 3)When HREF goes low, increment the X axis. and set the Y axis to 0. 4)Repeat 2 and 3, until 1. Then update frame, reset X and Y axis.
SO:
while(1){
int x = 0;
int y = 0;
int[][] data = new int[][];
wait(VSYNC);
while(VSYNC == 0){
while(HREF){
wait(PCLK);
data[x][y] = Y.read();
y++;
}
x++;
y = 0;
}
Graphics.drawImage(data);
}
Is this right? Does this give pixel data left to right or top to bottom?
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.