diff --git a/src/MindVisionCamera.cpp b/src/MindVisionCamera.cpp index fe38b12..5494c63 100644 --- a/src/MindVisionCamera.cpp +++ b/src/MindVisionCamera.cpp @@ -319,8 +319,8 @@ bool MindVisionCamera::set_resolution(int width, int height){ res.iIndex = 0xFF; res.iWidth = width; res.iHeight = height; - res.iWidthFOV = res.iWidth; - res.iHeightFOV = res.iHeight; + res.iWidthFOV = capability.sResolutionRange.iWidthMax; + res.iHeightFOV = capability.sResolutionRange.iHeightMax; res.iHOffsetFOV = 0; res.iVOffsetFOV = 0; @@ -329,7 +329,7 @@ bool MindVisionCamera::set_resolution(int width, int height){ this->width = width; this->height = height; image_resolution = res; - return false; + return true; } return false; } \ No newline at end of file diff --git a/src/MindVisionMain.cpp b/src/MindVisionMain.cpp index be33365..4b706b2 100644 --- a/src/MindVisionMain.cpp +++ b/src/MindVisionMain.cpp @@ -64,7 +64,7 @@ void set_camera_resolution(MindVisionCamera& camera, int width, int height) { int main(int /*argc*/, char* /*argv*/[]) { std::string target_color = "red"; int cam_id = 0; - cv::Size default_resolution(640, 480); + cv::Size default_resolution(1280, 720); bool use_ttl = false; // Set to false to disable TTL communication // Define optional resolution list (adjust based on camera support)