lewisxhe / esp32-camera-screen

TTGO T-camera Plus
https://ru.aliexpress.com/item/TTGO-T-camera-Plus-ESP32-DOWDQ6-8-MB-SPRAM-OV2640-1-3/32971057846.html?fbclid=IwAR1uUoWC-UiemD8rKwg15WvpM7zhtvxUxdZhh0jnbrkFkNah6MV6Stg5Kag
65 stars 52 forks source link

Request display camera-streaming on TFT as mirror image ( flip right to left , left to right). #6

Closed TridentTD closed 5 years ago

TridentTD commented 5 years ago

Request display camera-streaming on TTGO-Camera-Plus's TFT as mirror image/reflected image = flip right to left , left to right.

(Not for image-capturing, for displaying on TFT )

lewisxhe commented 5 years ago

@TridentTD Do you mean mirroring the screen or flipping it?

TridentTD commented 5 years ago

@lewisxhe Yes. When TTGO-Camera-Plus is streaming image to TFT, it will look like mirroring.

lewisxhe commented 5 years ago

@TridentTD https://github.com/lewisxhe/esp32-camera-screen/blob/8b42c7d60bfecbd7b76950c37da122741ac0571c/main/app_screen.cpp#L453 Set the direction here

TridentTD commented 5 years ago

setRotation(0) -> setRotation(1) -> setRotation(2) -> setRotation(3)

As I known , this funciton is only rotation , doen't make image flip by y-axis.

lewisxhe commented 5 years ago

@TridentTD https://github.com/lewisxhe/esp32-camera-screen/blob/8b42c7d60bfecbd7b76950c37da122741ac0571c/main/app_screen.cpp#L452 Reverse display and rotation are here.

TridentTD commented 5 years ago

@lewisxhe

tft->invertDisplay(true) & tft->invertDisplay(false) is only invert color as the following result 's picture.

https://ibb.co/qC7jKxR

lewisxhe commented 5 years ago

@TridentTD Oh ! Then you have to refer to the ST7789 data sheet.

TridentTD commented 5 years ago

@lewisxhe OK. I can flip JPG image-mirroring .

https://www.youtube.com/watch?v=h2aQZ8MXjJM

Thank you.

akeilox commented 5 years ago

@TridentTD which part of the code you had to change for image mirroring, can you share for the benefit of others?