Shop OBEX P1 Docs P2 Docs Learn Events
Live Video Scaling — Parallax Forums

Live Video Scaling

JWB80JWB80 Posts: 5
edited 2010-08-24 10:37 in Propeller 1
I would like to interface a color camera such as the C328 to the prop. Have it bring in the video scale it horizontally and vertically (larger and/or smaller) then adjust where on the output (vga/composite) it's displayed. I'd have 2 pots for the zoom/scale (1 for hor 1 for vert) 2 for the position of the output (1 for hor and 1 for vert). Last would be 2 pots for brightness and contrast. This will basically be like the adjustments on your monitor only for a camera. Anyone that can help will be compensated once this becomes a marketable product.

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-23 11:10
    Sorry, the current prop does not have enough horsepower (or memory) to do what you want.
    JWB80 wrote: »
    I would like to interface a color camera such as the C328 to the prop. Have it bring in the video scale it horizontally and vertically (larger and/or smaller) then adjust where on the output (vga/composite) it's displayed. I'd have 2 pots for the zoom/scale (1 for hor 1 for vert) 2 for the position of the output (1 for hor and 1 for vert). Last would be 2 pots for brightness and contrast. This will basically be like the adjustments on your monitor only for a camera. Anyone that can help will be compensated once this becomes a marketable product.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2010-08-23 13:13
    Humanoido's "Skyscraper" has made me wonder about applications of mutiple Propellers working together. I know one Prop can't do what JWB80 wants, but could forty Props do it?

    If you could feed the signal to all the Props and have each Prop process only one line, could the signal be "put back together" and displayed?

    I'm sure this is a very awkward and probably expensive way of doing it. But I do wonder if it would be possible.

    Duane
  • LeonLeon Posts: 7,620
    edited 2010-08-23 13:55
    I doubt if they can communicate fast enough. There are much better devices for that sort of thing.
  • TubularTubular Posts: 4,717
    edited 2010-08-23 14:25
    Have a look at the video on this page -
    http://www.4dsystems.com.au/prod.php?id=75

    The video stream there is at a low res (128x128) and frame rate. This will give you some idea of what might be achievable through a serial link. Perhaps this is adequate for your application? 160x120x1byte/pixel (colour or grey) would use 58% of the props hub memory.

    Does the zoom need to be continuous or could it jump to integer magnifications (1x, 2x, 3x etc) ?
  • BaggersBaggers Posts: 3,019
    edited 2010-08-24 02:07
    If you're happy with a 128x96 display, my wolf renderer technique could scale the image, it uses 4 cogs to render, and 1 to display, + spin glue code, but that could be part of the pasm.
    Then all you'd have to do is have a serial cog to read the data, and another cog to decode the jpg, if you use the camera's 80x60 output, then it would probably decode the jpg rather quickly in pasm. depends on what image resolution you were wanting.

    So yes, it is possible on a single prop, but it would be low resolution.
  • JWB80JWB80 Posts: 5
    edited 2010-08-24 04:31
    I was thinking have a a/d converter between the camera and prop so that it comes into the prop alright broken down into bits parallel. You guys rock. I'll give you a little back ground. My primary use is for my girlfriend, she can only see 1/2 of what comes into her right eye because of brain surgery. I'm thinking if I use those monitor glasses hooked to a camera with my gizmo doing the processing. I'm aiming to compress the whole image into the left 1/2 of my display. I don't think res will be a big deal on this prototype ver. Just as long as you can make out cars/pedestrians (mimes optional), if she's standing in someones way ect. Things we take for granted everyday. If it is received well by her and a few dr's I'd bust out some real power, piles of props or an atom/Pentium and probably some cash to everyone who helps with this. It would be nice to build a low cost unit we could sell/donate to people who have sight problems but not alot $.
  • JWB80JWB80 Posts: 5
    edited 2010-08-24 04:32
    Leon what's a better device to use?
  • JWB80JWB80 Posts: 5
    edited 2010-08-24 04:36
    Tubular wrote: »
    Have a look at the video on this page -
    http://www.4dsystems.com.au/prod.php?id=75

    The video stream there is at a low res (128x128) and frame rate. This will give you some idea of what might be achievable through a serial link. Perhaps this is adequate for your application? 160x120x1byte/pixel (colour or grey) would use 58% of the props hub memory.

    Does the zoom need to be continuous or could it jump to integer magnifications (1x, 2x, 3x etc) ?

    1x-5x would work in half increments controlled by a pot
  • LeonLeon Posts: 7,620
    edited 2010-08-24 04:37
    I'd use an ARM. A Cortex-M3 with 64kB SRAM such as the LPC1763 should be able to manage it, you can get an mbed module with an LPC1768 for $59. I'd use rotary encoders instead of pots.
  • ericballericball Posts: 774
    edited 2010-08-24 10:08
    Thinking about what you are trying to accomplish, here are my thoughts:

    1. You are going to want to have as little latency as possible. So the less processing done at each stage the better.
    2. You have three main components: the camera which provides the input, the glasses for output and some kind of processor between them. The processor needs to interface with the input and output components, transform the data as required, and implement the scaling.
    3. What kind of interface do the glasses have (VGA or composite, analog or digital) and what resolution? The Prop's video output is great, if somewhat limited. Because your are scaling horizontally you don't need to buffer an entire frame, just a line or two.
    4. The camera output is the real challenge. The Propeller doesn't have the ability to digitize video at a decent rate so ideally this would be done by the camera component. But then that data has to be streamed to the Propeller. It would also be easier if the camera output matches the glasses input so you don't have to do any colorspace conversions.

    It may even be possible to accomplish your task without a dedicated processor. Back in the late 80s / early 90s I did some digital video filtering using a FIR filter chip and a FIFO as a line buffer with some EPROMs to generate the sync data. So slurp in the line then spit it back out twice as fast and generate blank to sync.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2010-08-24 10:34
    JWB80,

    Could you physical hack the monitor glasses and move the entire screen so it was in her field of view?

    I also wonder if there is an optical solution. When my brother was in traction for several weeks, he used some prism glasses that allowed him to watch TV and read a book without having to have the TV on the ceiling or having to hold the book up in front of his face. Could some combination of mirrors, prisms and lenses be made to accomplish the results you're after?

    Duane
  • JWB80JWB80 Posts: 5
    edited 2010-08-24 10:37
    Encoders do sound better no calibration. The glasses take just about any input, I was going with vga because it's got a fairly good pic/res. The ones I looked at did 1024x786 and up. The really expensive ones went higher but I think 1024 or 800x600 should be sufficient. I'm gonna look into the arm idea also. Would I use an arm because it's more powerful/is made to handle this amount of data throughput?
Sign In or Register to comment.