stupid video capture
Perry
Posts: 253
Update June 13 2011
new code called PropPixelator
amazing simple hardware changes
This version uses the keyboard as operator interface
'
' input controls : function:
'
' key 0.1.2.3.4.5.6.7.8.9 ..... select video to play/record
'
' key S/s .................... SHOW displays real time video and selected file
'
' key P/p .................... PLAY
'
' key R/r .................... RECORD
'
' key D/d .................... DUMP live image to BMP file
'
' key SpaceBar .............. Pause/Go
Cogs used
0 the main one
1 keyboard input
2 Grey TV display
3 audio in/out ADC/DAC combined
4 video in ADC
5 fsrw/safe_spi
6
7
There are two example video files on post #62 that demonstrate the capabilities of this program. Also new schematic for interface hardware.
Update November 29 2010
Amazing Video
a simple SD video recorder/player
Now contains large video clip of the "Flintstones"
You need to put the files PLEASE.POP and VIDEO0.POP on your SD card.
PLEASE.POP plays when you change modes.
video0.pop will be played if you press the play button or if you set the main program 8bc_video.spin to startup in play mode.
control is via an infra red remote
SHOW display real time
PLAY play recorded video VIDEO0.POP
RECORD increase name of VIDEO?.POP and records some video
Still a work in progress
Cogs used
infra_red input
tv display
audio in adc
audio out duty DAC
video in adc and 15750 khz audio buffer fill
fsrw/safe_spi
sometimes have to compile in play mode to test.
Video is now much better than original, have to right shift 2 bits so there is not too many shades for standard propeller video circuit.
Old Stuff Below:
Here is another simple toy that uses the sigma-delta circuit
it captures NTSC video and puts it out on the TV
no sync separator required. Don't be afraid to try this out, I have fly wires all over my proto board and it still functions passably (sync separator does not do much better)
the A/D converter is running at 6bits , 1.25 Mhz you get 64 dots by 96 lines, the sync detector only sees vertical sync and then the capture proceeds on a timeing basis only.
the image you see below shows an example capture
a graph of the horizontal video line and some a/d values for one of the lines
finally the number of microseconds for the spin code to display the captured image
Perry
P.S. Just tried changing the code to baseband video ( wanted to capture an image for forum) and it only seems to work on VHF tv ???
expect an update (or may be problem with my proto board)
Baseband is OK, my prop board video out had a small capacitor for VHF TV use
Post Edited (Perry) : 11/24/2007 3:52:00 AM GMT
new code called PropPixelator
amazing simple hardware changes
This version uses the keyboard as operator interface
'
' input controls : function:
'
' key 0.1.2.3.4.5.6.7.8.9 ..... select video to play/record
'
' key S/s .................... SHOW displays real time video and selected file
'
' key P/p .................... PLAY
'
' key R/r .................... RECORD
'
' key D/d .................... DUMP live image to BMP file
'
' key SpaceBar .............. Pause/Go
Cogs used
0 the main one
1 keyboard input
2 Grey TV display
3 audio in/out ADC/DAC combined
4 video in ADC
5 fsrw/safe_spi
6
7
There are two example video files on post #62 that demonstrate the capabilities of this program. Also new schematic for interface hardware.
Update November 29 2010
Amazing Video
a simple SD video recorder/player
Now contains large video clip of the "Flintstones"
You need to put the files PLEASE.POP and VIDEO0.POP on your SD card.
PLEASE.POP plays when you change modes.
video0.pop will be played if you press the play button or if you set the main program 8bc_video.spin to startup in play mode.
control is via an infra red remote
SHOW display real time
PLAY play recorded video VIDEO0.POP
RECORD increase name of VIDEO?.POP and records some video
Still a work in progress
Cogs used
infra_red input
tv display
audio in adc
audio out duty DAC
video in adc and 15750 khz audio buffer fill
fsrw/safe_spi
sometimes have to compile in play mode to test.
Video is now much better than original, have to right shift 2 bits so there is not too many shades for standard propeller video circuit.
Old Stuff Below:
Here is another simple toy that uses the sigma-delta circuit
it captures NTSC video and puts it out on the TV
no sync separator required. Don't be afraid to try this out, I have fly wires all over my proto board and it still functions passably (sync separator does not do much better)
the A/D converter is running at 6bits , 1.25 Mhz you get 64 dots by 96 lines, the sync detector only sees vertical sync and then the capture proceeds on a timeing basis only.
the image you see below shows an example capture
a graph of the horizontal video line and some a/d values for one of the lines
finally the number of microseconds for the spin code to display the captured image
Perry
P.S. Just tried changing the code to baseband video ( wanted to capture an image for forum) and it only seems to work on VHF tv ???
expect an update (or may be problem with my proto board)
Baseband is OK, my prop board video out had a small capacitor for VHF TV use
Post Edited (Perry) : 11/24/2007 3:52:00 AM GMT
Comments
When I get the timings right, you
(a) filter somewhat below 1 MHz with the hardware (220k * 5 to 10 pF Propeller input)
(b) you sample 72 pixels/line at around 1 us in the assembly part
(c) you copy those "mega pixels" with an extremely slow loop onto the Prop video.
As the last loop will use a mixture of nearly 100 real time frames this should look funny..
I don't know, I did not check it..
What is the distribution of the luma values you sample within 1us? As you see 6 bit resolution you can estimate the quality of the filtering from it...
As you will have only 2 grayscale values using GRAHICS you can easily increase the sampling to have 160 pixels per line...
Things will look much clearer (again: I do not know how they look now ), when you prebuffer a complete frame, not just a line...
·· Attila
Do you think this could lead to some sort of short range RF application due to the Propeller being able to Broadcast signals?
mean while a short explanation:
the spin code passes base addres of byte array for image to the frame grabber, that uses code stolen from Terry Hitt's OSD and sigmal-delta
it simply copies every thing it sees into the byte array with a little bit of code to try to fressen up the image
you start with 6 bits of A/D , I then do some arithmetic to try to get rid of the offset from the sync pullses and SHR once to dump noise
you end up with about 4 or 5bits of gray.
the grabber is running full speed my attempts with modifiications to "Prop" assembly to do only one grab are still primitave hacks
the spin code then continously dumps the the recievied data to the display , but this takes over 1.2 seconds.
the code does not even do double buffering
pictures are OK at low levels
Can hardly wait for the "Prop II" , lack of RAM memory is often a problem for my "stupid" ideas
Perryt
Post Edited (Perry) : 10/31/2007 2:28:27 AM GMT
P.S.: What you have described is very clear from the code...
In fact you can transmit whatever you want. Just modulate any frequency you like from 100kHz to 100 MHz (even above) and add an antenna of appropriate length to the output pin....
I changed the init colors back to "$2B060C02" from "$04030201", seems xawtv needs some color to work properly.
also it would not start properly until I put a volt meter at the junction of the 1Meg ohm resistors ( it reads 1.567 volts)
that point needs some analysis to decide on better values to do the sync separation
I even cut the power lead to the LM1881 sync separator, thinking it's signal was leaking into the other.circuit
Perry
P.S
just replaced the lower 1M ohm resistor with 680k + 3 * 100K = 980 , voltage now reads 1.549
sync capture starts right away every time, I think the ratio is important, any one have suggestions on standard resistors values for this application.
Post Edited (Perry) : 10/31/2007 2:23:55 AM GMT
I knew the prop could generate such signals, just had not seen where it could recieve them.
Simple RC commands would be great, but data from remote sensors would be nice as well.
Thanks for posting this. I actually thought that this was impossible... for some reason, which I don't remember.
This is a stupid question... but since I just barely understand what you are doing here, please allow it:
Can you increase the bit depth by assuming that you have a static image coming in on the video and sampling successive frames as though they are not changing?
Rich
Really a cool idea. Are you hacking one of HC-OSD modules to do this ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My goal is to live forever...Or die trying.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
You may have, like me, seen the same thread. Some one asked if the Prop could pick up TV signals as well as send them. And the answer was no due to the speed of the signal. I guess I kind of assumed that any signal could not be picked up. This is a great study Perry. That TV wrist watch is just around the corner!!
Once people figure out what is possible... then they find the most interesting ways of doing it.
There should be more people like Perry and Bean.
you'll be wanting it back then [noparse]:)[/noparse]
the signal-delta is no big deal. (if anyone at Parallax saw my protoboard layout they would be rolling their eyes in disgust)
I hope it breaks forum readers from any reticence about trying out the sigmal/delta circuit
and secondly the propeller could capture video on it's own
now comes the long refinement stage to actually make it useful, reliable and reproduceable
and also what uses could it have?
it was mainly designed to give imageing to a Propellor Sumobot, I have slowly been working on.
I still have 8 unused pins on it. maybe even stereo images.(B/W CMOS cameras are really cheap)
for distance imaging on a robot you don't need 128 lines of video just 16 or 32 from could be plenty
you could sum pairs of lines to gain bits of grayscale
Perry
P.S.
Sorry Bean I could not afford your OSD. The local "Community Futures" bought me a "Robot Competition Kit" and a pack of protoboards when i proposed giveing an "Intoduction to Robotics" to the local high school. They are still dragging their feet on actually scheduling the event
I cut it from the prop tool and then spent spent quite some time getting it to display well with Firefox,
now I see I.E. does not do it so good. ( isn't that what the "CODE" example button is for?
What browser do you use ?
Perry
It know seems to work very reliably, can even watch hockey games, eh!
New schematic and code has been put at the top of this thread.
The use of infra red receiver allows one to adjust parameters in the code on the fly, subtracting an offset value to dump of the sync pulse from the video A/D and shifting the number of bits displayed << or >> to dump noisy bits.
I'd bet dollars to donuts you could build this circuit on a demo board, would like to see reports of any one try this out.
Perry
Going to make robots interesting.
Doing this on Prop 2 should be a breeze.
Tried a few times to get my hands on Omnivision's OV6920 1/18" cmos image sensor.
Could even generate the OV6920 required clock from the prop, making it easy to lock the scan rate.
Guess I have to hang around hospitals and wait for them to throw them away.
http://www.ovt.com/data/newsreleases/english/OV6920_medical_sensor_Avantis_FINAL.pdf
Think we can get Parallax to make a micro camera PCB?
Graham, flying robots with collision avoidance?
New prop data sheet does not have chip weights[noparse]:([/noparse]
LQFP 0.36 grams on my new 0.01gm scale, 6.28gm for DIP40, don't have any QFNs to weight.
Gavin
·
Graham
I have one B/W ,one color camera , and satellite receiver as inputs
going to try inter leave two videos with this driver
Perry
This one is using a sync separator (LM188x)
filename for recording is hard coded
VIDEO1.zip is short clip
Perry
Post Edited (Perry) : 6/13/2008 1:10:01 AM GMT
Back in 2007 I accepted your challenge and tried to breadboard your circuit... and it worked except... almost.
I sense that you are on the front of the curve and encourage you to think commercial...
I really love playing with hardware... but I rarely get anything to work. I strongly encourage you to keep up the good work and to offer some products along the way[noparse]:D[/noparse]
Rich
What is that ".pop" file in video.zip ??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
put it on your SD card and use play_video to see a short clip , should work on systems with video on pins 12 ... and SD cn 0,1,2,3
Perry
This project is very interesting. It reminds me of the "PXL-2000".
www.google.com/search?hl=en&q=PXL-2000
But, the sync circuit wasn't always working for me for reasons I don't quite get...· I'm generating video with the Prop and trying to display it on the LCD.· I think I have it working but I had to change the circuit to this:
Had to break out a scope to see what was going on...· I'm not sure I'm completely happy with this, but it more or less works now...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm