Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- uses: pguyot/arm-runner-action@v2
with:
base_image: https://github.com/PhotonVision/photon-image-modifier/releases/download/Dev/photonvision_raspi_dev.img.xz
base_image: https://github.com/PhotonVision/photon-image-modifier/releases/download/v2027.0.0/photonvision_raspi_dev.img.xz
cpu: cortex-a7
image_additional_mb: 1500
bind_mount_repository: true
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(OpenGL REQUIRED COMPONENTS OpenGL EGL)
pkg_check_modules(LIBDRM REQUIRED libdrm)
pkg_check_modules(LIBCAMERA REQUIRED libcamera)

# we now require libcamera 0.6
set(LIBCAMERA_MIN_VERSION "0.6" CACHE STRING "Minimum libcamera version")
pkg_check_modules(LIBCAMERA REQUIRED "libcamera>=${LIBCAMERA_MIN_VERSION}")

pkg_check_modules(LIBGBM REQUIRED gbm)

set(OPENCV_YEAR "frc2025")
Expand Down
3 changes: 2 additions & 1 deletion include/camera_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include <string>
#include <string_view>
#include <vector>

enum CameraModel {
Expand All @@ -30,5 +31,5 @@ enum CameraModel {
OV7251,
Unknown
};
CameraModel stringToModel(const std::string &model);
CameraModel stringToModel(std::string_view model);
bool isGrayScale(CameraModel model);
20 changes: 10 additions & 10 deletions src/camera_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@
#include <algorithm>
#include <cstring>
#include <string>
#include <string_view>

static const CameraModel grayScaleCameras[] = {OV9281};
static const CameraModel grayScaleCameras[] = {OV9281, OV7251};

CameraModel stringToModel(const std::string &model) {
const char *famname = model.c_str();
if (!strcmp(famname, "ov5647"))
CameraModel stringToModel(std::string_view model) {
if (model == "ov5647")
return OV5647;
else if (!strcmp(famname, "imx219"))
else if (model == "imx219")
return IMX219;
else if (!strcmp(famname, "imx708"))
else if (model == "imx708")
return IMX708;
else if (!strcmp(famname, "imx477"))
else if (model == "imx477")
return IMX477;
else if (!strcmp(famname, "ov9281"))
else if (model == "ov9281")
return OV9281;
else if (!strcmp(famname, "ov7251"))
else if (model == "ov7251")
return OV7251;
else if (!strcmp(famname, "Disconnected"))
else if (model == "Disconnected")
return Disconnected;
else
return Unknown;
Expand Down
Loading