Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghost image when redrawing screen #52

Open
nicolacimmino opened this issue Jun 6, 2021 · 7 comments
Open

Ghost image when redrawing screen #52

nicolacimmino opened this issue Jun 6, 2021 · 7 comments

Comments

@nicolacimmino
Copy link

Hi,

I am having an issue that when I display some text on the screen the previously displayed one is visible in negative (whiter than the background).

any hints on what could be wrong?

I always write to a fully cleared frame buffer first:

writeln(font, buffer, &x0, &y0, Peripherals::framebuffer);

and then draw the full buffer:

  epd_poweron();
    epd_clear();
    epd_draw_grayscale_image(epd_full_screen(), Peripherals::framebuffer);
    epd_poweroff();
    memset(Peripherals::framebuffer, 0xFF, EPD_WIDTH * EPD_HEIGHT / 2);

See picture below for the issue:

IMG_20210606_120628

@martinberlin
Copy link

martinberlin commented Oct 3, 2021

This a normal effect on this epapers. That's why kindle writes kind of a reverse image when updating. But also in other epapers like my Hisense color phone it also has a ghost effect when only partial updates are used. Only using full clear mode that is super slow solves it.

@AndreKR
Copy link

AndreKR commented Nov 13, 2021

So, what do we need to do fix it, like the Kindle does?

I'm running into the same issue. Here you can clearly see the text "Voltage: 4.94V" because I was running the "demo" example before and you can even see the eyes of the manga girl because I once ran the "drawImages" example on the display:

image

I think the reason why you can only see the "Voltage" line and not the other lines from the "demo" example is that they are somehow drawn differently because of partial refresh. Here is a picture with the "demo" example running and you can see how the partially refreshed area has much higher contrast:

image

@giladaya
Copy link

I struggled a lot with this issue.

The initial approach I tried was to draw the negative of the previous image before clearing the screen and painting the new image.
This can be done using the WHITE_ON_WHITE display mode like this:
epd_draw_image(epd_full_screen(), frameBuffer, WHITE_ON_WHITE);

This works, but the downside is that you need to have a copy of the previous image, which is not always possible.

Eventually I came up with this sequence for drawing the new image, which seems to solve the ghosting and give good contrast:

void drawFrame(uint8_t *framebuffer)
  {
    epd_clear_area_cycles(epd_full_screen(), 2, 80);
    delay(100);
    
    epd_draw_image(epd_full_screen(), framebuffer, WHITE_ON_WHITE);
    epd_draw_image(epd_full_screen(), framebuffer, WHITE_ON_WHITE);
    epd_draw_image(epd_full_screen(), framebuffer, WHITE_ON_BLACK);
    
    epd_draw_image(epd_full_screen(), framebuffer, BLACK_ON_WHITE);
  }

Notes:

  • It's a bit slow but you can play with the commands to find a balance between refresh time and quality.
  • Note that I'm mostly using the display to show pictures (not text), so YMMV.

@geiseri
Copy link

geiseri commented Mar 8, 2022

I found the more times I update the screen with the same image the stronger the ghosting is and the more times I need to run the code above. @LilyGO is there a better waveform that can be used to mitigate this?

@fuef
Copy link

fuef commented Nov 16, 2024

Assuming that

epd_draw_image(epd_full_screen(), framebuffer, WHITE_ON_WHITE);

epd_draw_image(epd_full_screen(), framebuffer, BLACK_ON_WHITE);

represents drawing mode A2, can we confirm that

epd_clear_area_cycles(epd_full_screen(), 2, 80);

is indeed DU / DU4 white on white?

Also, when we say epd_full_screen(), is it realistic to expect that partial refresh will happen? Or would it rather refresh the whole of the screen, slowly?

image

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Dec 17, 2024
@fuef
Copy link

fuef commented Dec 20, 2024

Although this issue is indicative that something isn't quite right with the product design, the progress is mostly happening in one of the other related issues (#93 ). Would it make sense to close this one as duplicate? In fact, there are many duplicate issues related to poor / inoperable partial refresh and ghost images. #93 has a promising mod by Tasshack.

@github-actions github-actions bot removed the stale label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants