Skip to content
Snippets Groups Projects
Commit 5c3fcf63 authored by Vladislav Vlasuk's avatar Vladislav Vlasuk
Browse files

lesbarkeit

parent 2091400a
Branches vladi
No related tags found
No related merge requests found
......@@ -5,8 +5,8 @@
#include "esp_camera.h"
// Bitte um eigenes Board erweitern (falls nicht schon vorhanden!)
// Unterstützte Boards:
// * Waveshare ESP32ONE
// *
// * waveshare_esp32_one
// * m5stackv2_psram_esp32
// *
// *
......
......@@ -8,7 +8,7 @@ thk_EspCamDriver camera(waveshare_esp32_one, // #1 ESP32 Board (verfügbare B
FRAMESIZE_96X96, // #2 Auflösung (siehe camera_boards.h)
PIXFORMAT_GRAYSCALE, // #3 Bildformat (siehe camera_boards.h)
&image); // #4 esp_image_t objekt, wo das Bild gesichert wird
// PIXFORMAT_GRAYSCALE ermöglicht nur FRAMESIZE_96X96 oder FRAMESIZE_240X240
void setup()
{
Serial.begin(115200);
......@@ -21,12 +21,12 @@ void loop()
{
// Bild auslesen
camera.take_picture(&image);
Serial.println(image.width);
Serial.println(image.height);
for(int pixel = 0; pixel < (image.width*image.height);pixel++){
Serial.print(image.buf[pixel]);
if(pixel%100 == 0)Serial.println(" ");
}
Serial.printf("width %i, height: %i, len:%i\n",image.width,image.height,image.width*image.height);
Serial.println("image buffer >>\n");
/*for(int pixel = 0; pixel < (image.width*image.height);pixel++){
Serial.print(image.buf[pixel]);Serial.print(" ");
if((pixel+1)%50 == 0)Serial.println(" !! ");
}*/
// Speicher freigeben
camera.free_buffer(&image);
......
#include "Arduino.h"
#include "thk_EspCamDriver.h"
enum resformat {f_96x96_grayscale, f_240x240_grayscale};
thk_EspCamDriver::thk_EspCamDriver(espboard_t board, esp_image_t *img)
: image(img), board(board)
{
......@@ -19,6 +21,7 @@ thk_EspCamDriver::thk_EspCamDriver(espboard_t board, framesize_t s, pixformat_t
set_pixelformat(f);
};
// Erzeugt eine Konfiguration basierend auf Klassenattributen
// Muss vor dem Auslesen der Kamera erfolgen!
void thk_EspCamDriver::create_config()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment