Shop OBEX P1 Docs P2 Docs Learn Events
Greyscale NTSC. — Parallax Forums

Greyscale NTSC.

potatoheadpotatohead Posts: 10,254
edited 2007-06-17 10:27 in Propeller 1
Was thinking about a question rjo put here about low to moderate resolution grey scale images. If you mix pixels together, it's possible to get 12 shades of grey out of the reference NTSC video circuit. Done at 160 pixels of horizontal resolution, dithering could then represent perhaps double that, but with a fairly coarse effective resolution --and the patterns can be seen. Higher pixel clocks can improve this somewhat, as can more than one COG rendering a scanline at one time. All of these things get messy in some fashion or other.

I'm thinking the VGA output might do a far better job of this with maybe only a small DAC circuit, or using one channel to build a signal.

Let's say we add a few minor components, or build an adapter cable, similar to the one OldBitCollector did for his Atari joysticks. What can be done with the VGA output, timed for TV displays, leaving color out of the equation?

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-06-14 18:16
    Yes you are correct, you could use a R2R ladder. Say an 8 bit ladder is used, the span from white to sync is 140 with black occupying the value of 50 above sync. With sync occupying 0, black would be value 91 so there would be 165 shades of gray.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • rjo_rjo_ Posts: 1,825
    edited 2007-06-15 16:21
    Potatohead...

    I'm having so much fun playing with the hardware in the education kit... that I've completely ignored my main love... image processing. And I'm kicking myself for not not knowing more by now and not being able to understand a lot of the conversation so far...

    I know it sounds pretty stupid... but actually being able to play with simple stuff like R/C circuits is quite hypnotic.

    So... If you get anything working... or if you need anything... let me know[noparse]:)[/noparse]

    By the way, I'm completely serious about the one pixel camera... It will be the slowest panoramic camera in the world... but it will be mine!!!


    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2007-06-15 16:37
    I did some tests... and by just using Spin... and the R/C routine with a photoresistor... we can get at least 750,000 levels of gray... at roughly 1000 pixels per second.
    That doesn't sound like much... but that's without picking the right components. An article in the recent edition of Photonics (a freebee at the Sensors meeting)... insects use about this number of pixels to achieve stable flight by simply computing optical flow!!!!.

    So, I think this is useful for control purposes[noparse]:)[/noparse]

    Rich
  • potatoheadpotatohead Posts: 10,254
    edited 2007-06-15 17:50
    Very cool!

    I like image processing too. So, you've got a control problem and a display problem then?

    I've gotta go do some math, and some re-learning of core electric theory, to build my R2R ladder. I've a few things I want to do first, with the reference video circuit, and what I learned about pixel timing. At some point, laying out the circuit on the demo board does not seem like all that difficult of a task. Most of the driver code is written, where timing is concerned. Just need to craft different palettes for the control / sync signals, and build a bitmap. At one byte per pixel, you get the 160 greys. What did you mean by low resolution? 80x96 -- 160x96 maybe? Those would fit into the prop RAM. (7K for the 80 pixel resolution)
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-06-15 17:57
    Theres a company in silicon valley that makes integrated R2R ladders of various number of bits where they are very well matched. Now if I can only remember thier name...

    <edit> Found it, Semiconwell: http://www.semiconwell.com/r_net/swr2r.htm·</edit>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • potatoheadpotatohead Posts: 10,254
    edited 2007-06-15 18:25
    Ok, that's cool. I was planning a bunch of resistors, shareware sound card scope to evaluate the steps, and known solid video references + eyeball, to match it all up. This would solve almost all that, but...

    Bummer though, samples only for qualified prospects, having spent dollars, or having dollars in the queue. Understandable, but not for me. I think I'll open up another thread on that matter...

    Edit: OldBitCollector beat me to it: http://forums.parallax.com/forums/default.aspx?f=15&m=196854
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-15 18:27
    rjo_ said...


    By the way, I'm completely serious about the one pixel camera... It will be the slowest panoramic camera in the world... but it will be mine!!!


    Well that's all a great many scanning microcopes have. You could do some cool things, writing the data to an SD card would be a good first step.

    Graham
  • rjo_rjo_ Posts: 1,825
    edited 2007-06-17 00:45
    Graham,

    By the way... about cool things. I know you are busy... but I think we could beat the current state of the art in OCT with a few Props!!!

    Potatohead,

    I don't have any control problems... but I have some good friends that never get tired of control solutions!!! My main problem is that I was astounded by the Propeller... when I knew only a little bit about it... the more I learn... the more astounded I become. I was reading through the Millennium Problems... by Devlin. Trying to find a way to pick up an easy $1M. AND what did I find?... the P vs. NP problem. IT turns out that you can't solve the P vs NP problem...formally... because it is based on a bogus definiting of "machine" instructions.... If you throw the Prop's architecture at the committee that runs the contest... I think they will have a stroke[noparse]:)[/noparse]

    Question: how many instructions can you execute in Spin in one second?... the answer I got out of the forum was ... I don't remember... but it was way... way ... way too low. You have to assume that the counters count for something... right? So, throw the counters in and you have 1.6*8 M instructions per second...And there seem to be some other utilities just floating around waiting to be accounted for as well[noparse]:)[/noparse]

    Rich
  • cgraceycgracey Posts: 14,133
    edited 2007-06-17 08:44
    You guys can use DUTY mode in a CTR to achieve good greyscale. This is how Phil Pilgrim is getting his greyscale video for his camera. It only takes one pin, too. You'd have to make your own driver, but one pin and a resistor and capacitor can make a 5MHz (assuming 80MHz clock)·4-bit (16-level) DAC. This could draw the sync and the luminance levels. As long as color modulation is not going on, video can be really simple.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-17 10:27
    Rich, I'm all ears but off forum.

    I really need to get into video, I use it but have not read anything about it yet, the only sync I understand is in my kitchen [noparse]:)[/noparse]

    Graham
Sign In or Register to comment.