diff --git a/camera_lib/example/main.cpp b/camera_lib/example/main.cpp index c0721a0..ca55b40 100644 --- a/camera_lib/example/main.cpp +++ b/camera_lib/example/main.cpp @@ -135,7 +135,6 @@ int main() { CFileImageTag tag(nullptr, 0, 0); tag.SetImageId(i); - printf("width: %d, height: %d, stride: %d\n", frame.width, frame.height, frame.stride); CImageData data(frame.height * frame.stride, frame.data, frame.width, @@ -162,13 +161,13 @@ int main() } } - display_image("1D/2D Barcode Scanner", &frame); + display_frame("1D/2D Barcode Scanner", &frame); if (wait_key(30) >= 0) { // Add a delay and check for key press - release_image(&frame); + release_frame(&frame); break; // Exit the loop if any key is pressed } - release_image(&frame); + release_frame(&frame); } } close_camera(); diff --git a/camera_lib/include/camera_lib.h b/camera_lib/include/camera_lib.h index bc6dcbd..e39d803 100644 --- a/camera_lib/include/camera_lib.h +++ b/camera_lib/include/camera_lib.h @@ -33,8 +33,8 @@ extern "C" CAMERA_LIB_API int open_camera(int camera_index); CAMERA_LIB_API void close_camera(); CAMERA_LIB_API ImageData get_frame(); - CAMERA_LIB_API void release_image(ImageData *image); - CAMERA_LIB_API void display_image(const char *name, const ImageData *image); + CAMERA_LIB_API void release_frame(ImageData *image); + CAMERA_LIB_API void display_frame(const char *name, const ImageData *image); CAMERA_LIB_API void draw_line(ImageData *image, int x1, int y1, int x2, int y2, int thickness, int r, int g, int b); CAMERA_LIB_API void draw_text(ImageData *image, const char *text, int x, int y, int font_scale, int thickness, int r, int g, int b); CAMERA_LIB_API int wait_key(int delay); diff --git a/camera_lib/src/camera_lib.cpp b/camera_lib/src/camera_lib.cpp index 1e09ac1..bbabcb1 100644 --- a/camera_lib/src/camera_lib.cpp +++ b/camera_lib/src/camera_lib.cpp @@ -38,7 +38,7 @@ ImageData get_frame() return image; } -void release_image(ImageData *image) +void release_frame(ImageData *image) { if (image->data) { @@ -47,7 +47,7 @@ void release_image(ImageData *image) } } -void display_image(const char *name, const ImageData *image) +void display_frame(const char *name, const ImageData *image) { if (image && image->data) {