Skip to content

Commit

Permalink
Add diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbl committed Oct 31, 2023
1 parent 0b3170e commit 3dc2d66
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _labs/camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ libcamera-still -n --immediate -e bmp --width 128 --height 128 -o camera-test.bm

- Update the contents of your menu. It should now include the newly saved file.

- Display the contents of the picture using the newly added `display_draw_image_data` function. However, before you can use that function, you must convert the raw `uint8_t *` buffer into a `Bitmap` struct. This is because `camera_campture_data` returns the bytes of the BMP image file, which includes the BMP header. `display_draw_image_data` is expecting raw pixels values without a header. To process the header and pixel values, call `create_bmp` located in image.c. This function will parse the header and set the `pxl_data` struct field to just the raw pixel data.
- Display the contents of the picture using the newly added `display_draw_image_data` function. However, before you can use that function, you must convert the raw `uint8_t *` buffer into a `Bitmap` struct. This is because `camera_campture_data` returns the bytes of the BMP image file, which includes the BMP header. `display_draw_image_data` is expecting raw pixels values without a header. To process the header and pixel values, call `create_bmp` located in image.c. This function will parse the header and set the `pxl_data` struct field to just the raw pixel data. A diagram of this process can be seen [here]({% link assets/camera/data_flow.png %}).

- While the contents of the picture is showing, you must handle the following:
- If the right button of the d-pad is pressed, filter out the red color of the image.
Expand Down
Binary file added assets/camera/data_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3dc2d66

Please sign in to comment.