Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
thk_EspCamDriver
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thk_libs
microcontrollers
thk_EspCamDriver
Commits
5c3fcf63
Commit
5c3fcf63
authored
2 years ago
by
Vladislav Vlasuk
Browse files
Options
Downloads
Patches
Plain Diff
lesbarkeit
parent
2091400a
Branches
vladi
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
camera_boards.h
+2
-2
2 additions, 2 deletions
camera_boards.h
examples/stream/stream.ino
+7
-7
7 additions, 7 deletions
examples/stream/stream.ino
thk_EspCamDriver.cpp
+3
-0
3 additions, 0 deletions
thk_EspCamDriver.cpp
with
12 additions
and
9 deletions
camera_boards.h
+
2
−
2
View file @
5c3fcf63
...
...
@@ -5,8 +5,8 @@
#include
"esp_camera.h"
// Bitte um eigenes Board erweitern (falls nicht schon vorhanden!)
// Unterstützte Boards:
// *
W
aveshare
ESP32ONE
// *
// *
w
aveshare
_esp32_one
// *
m5stackv2_psram_esp32
// *
// *
...
...
This diff is collapsed.
Click to expand it.
examples/stream/stream.ino
+
7
−
7
View file @
5c3fcf63
...
...
@@ -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
.
print
ln
(
image
.
width
);
Serial
.
println
(
image
.
height
);
for
(
int
pixel
=
0
;
pixel
<
(
image
.
width
*
image
.
height
);
pixel
++
){
Serial
.
print
(
image
.
buf
[
pixel
]);
if
(
pixel
%
10
0
==
0
)
Serial
.
println
(
" "
);
}
Serial
.
print
f
(
"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)%5
0 == 0)Serial.println("
!!
");
}
*/
// Speicher freigeben
camera
.
free_buffer
(
&
image
);
...
...
This diff is collapsed.
Click to expand it.
thk_EspCamDriver.cpp
+
3
−
0
View file @
5c3fcf63
#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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment