Skip to content

--cg --vg resize: image streched #149

Open
@jjsarton

Description

@jjsarton

If we don't have the same aspect ratio for the camera and the video output the result is not very pretty.
For this case, we can calculate the region we will scale. For example, if --cg is 640x480 and --vg is 480x480, we my calculate the region to be processed and set

cv::Rect crop_region(80, 0,480, 480);

and call

cv::resize(raw(crop_region), raw, cv::Size(vidGeo.value().first,vidGeo.value().second));

instead of

cv::resize(raw raw, cv::Size(vidGeo.value().first,vidGeo.value().second));

This allows to get a non distorted output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions