Transparent Text and Fuzzy Image

Store Forums Video Experimenter Bugs/Problems Transparent Text and Fuzzy Image

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #788
    Matt
    Member

    Whenever i select input only it shows a clear stable image of the demo
    but when i flip over to overlay, it spazzes out, the video is fine but the demo is transparent and scrolling down the screen and going left. i’ve tried changing the pots (both of them) however nothing changes when using them. ???

    #2342
    Michael
    Keymaster

    what demo? I don’t know what code you are running.

    #2343
    Matt
    Member

    TVout-VE PAL Demo Code

    #2344
    Michael
    Keymaster

    Oh, that is an example for the original TVout library (which I did not develop). So it is not enabled for overlay. Doing overlay of TVout bitmaps onto an image requires special code that is included in the projects I’ve provided:
    http://nootropicdesign.com/ve/projects.html

    To do overlay, use the function initOverlay() below and call it from your setup function.

    void setup()  {
    tv.begin(PAL, W, H);
    initOverlay();
    ...
    }
    // Initialize ATMega registers for video overlay capability.
    // Must be called after tv.begin().
    void initOverlay() {
    TCCR1A = 0;
    // Enable timer1. ICES0 is set to 0 for falling edge detection on input capture pin.
    TCCR1B = _BV(CS10);

    // Enable input capture interrupt
    TIMSK1 |= _BV(ICIE1);

    // Enable external interrupt INT0 on pin 2 with falling edge.
    EIMSK = _BV(INT0);
    EICRA = _BV(ISC01);
    }


    #2345
    Matt
    Member

    Thankyou, if this works i’m gonna kiss your feet :-*

    #2346
    Matt
    Member

    Nothing comes up on the screen, i’ve tried changing the d9 to v but still nothing.

    I’m using this code

    #include 
    #include

    #define W 136
    #define H 96

    TVout tv;
    unsigned char x, y;
    unsigned char originx = 5;
    unsigned char originy = 80;
    unsigned char plotx = originx;
    unsigned char ploty = 40;
    char s[32];
    unsigned int n = 0;
    int index = 0;
    int messageLen = 32;
    char message[] = "...OVERLAY TEXT AND GRAPHICS ON A VIDEO SIGNAL...OVERLAY TEXT AND GRAPHICS ON A VIDEO SIGNAL";
    char saveChar;

    void setup() {
    tv.begin(NTSC, W, H);
    initOverlay();
    tv.select_font(font6x8);
    tv.fill(0);
    drawGraph();
    randomSeed(analogRead(0));
    }

    // Initialize ATMega registers for video overlay capability.
    // Must be called after tv.begin().
    void initOverlay() {
    TCCR1A = 0;
    // Enable timer1. ICES0 is set to 0 for falling edge detection on input capture pin.
    TCCR1B = _BV(CS10);

    // Enable input capture interrupt
    TIMSK1 |= _BV(ICIE1);

    // Enable external interrupt INT0 on pin 2 with falling edge.
    EIMSK = _BV(INT0);
    EICRA = _BV(ISC01);
    }

    // Required to reset the scan line when the vertical sync occurs
    ISR(INT0_vect) {
    display.scanLine = 0;
    }


    void loop() {
    saveChar = message[index + 22];
    message[index + 22] = '';

    for (int x = 6; x >= 0; x--) {
    if (x < 6) {
    tv.delay_frame(1);
    }
    tv.print(x, 87, message + index);

    for (byte y = 87; y < 96; y++) {
    tv.draw_line(0, y, 5, y, 0);
    tv.draw_line(128, y, 134, y, 0);
    }

    }

    message[index + 22] = saveChar;
    index++;
    if (index > 45) {
    index = 0;
    }

    sprintf(s, "%dms", millis());
    tv.print(0, 0, s);


    if (plotx++ > 120) {
    tv.fill(0);
    drawGraph();
    plotx = originx + 1;
    return;
    }
    byte newploty = ploty + random(0, 7) - 3;
    newploty = constrain(newploty, 15, originy);
    tv.draw_line(plotx - 1, ploty, plotx, newploty, 1);
    ploty = newploty;
    }

    void drawGraph() {
    tv.draw_line(originx, 15, originx, originy, 1);
    tv.draw_line(originx, originy, 120, originy, 1);
    for (byte y = originy; y > 15; y -= 4) {
    tv.set_pixel(originx - 1, y, 1);
    tv.set_pixel(originx - 2, y, 1);
    }
    for (byte x = originx; x < 120; x += 4) {
    tv.set_pixel(x, originy + 1, 1);
    tv.set_pixel(x, originy + 2, 1);
    }
    }

    When i flick over to sync, nothing comes to the screen either and the screen goes into timeout (waiting for image).

    #2347
    Matt
    Member

    Oky now i have it up on the screen however there is a massive issue, whenever i select sync only and set it to v-input the lines are randomly flicking at the text is spazzing out but the horizontal line seems to be ok, evrything else seems to just not want to work, i’ve tried both pal and ntsc, could this be a problem with the board i ordered from you guys?
    :'( :'( :'( :'( :'( :'(

    #2348
    Michael
    Keymaster

    What are you trying to accomplish? Are you trying to overlay a bitmap onto a video signal? Sounds like that works?
    Instead of saying “changing the d9 to v” and “flick over to sync”, can you please be more clear? I don’t quite know what you mean. Please reference the jumper as “sync select” and the switch as “output select” so I am clear and don’t have to guess.

    Leave the sync select jumper set to “V.INPUT” when you have a video source connected to the video input.

    All assembled boards we ship are tested with the frame capture demo here:
    http://nootropicdesign.com/projectlab/2011/03/20/video-frame-capture/

    Have you tried that one?

    When moving the output select switch, sometimes your TV may lose its sync with the input. My TV does that. A reset of the Arduino usually fixes it.

    #2349
    Matt
    Member

    All I’m trying to do is to use the demo code to overlay, there is nothing wrong with the code or the soldering of the board. However it does not work with pal or ntsc however when I use the other examples for sync only they work perfectly. Having major problems just trying to display the example overlay on the screen having transparent lines and text and random weird text bellow it. I dunno what else to say, I’ve tried using 660 ohm resistor however it does not change the brightness of the letters. I think the chip or the coward is damaged.

    #2350
    Michael
    Keymaster

    I’m still unclear because you reference “other demo” and I don’t know what code that is. Are you saying this:

    SYNC SELECT jumper in V.INPUT position for all tests
    unmodified OverlayDemo does not work when OUTPUT_SELECT switch in either position.
    ??? Demo works with OUTPUT_SELECT switch in both positions.

    Did you assemble the board yourself or buy it assembled?

    What model of Arduino are you using?

    You tried using a 660 ohm resistor *where*?

    Some transparency of the white pixels is expected, depending on the nature of your source signal. If the voltage is a bit high, it will bleed through the white.

    Please post exactly the code that does work (entire sketch) and the code that does not work.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.