-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
您好,我这边基于get_perspective_transform和warp_perspective,对图像做仿射变换,但是输出的图像一直是全黑的,相关代码如下,期待您的回复!
fcv::Point2f src_points[4];
fcv::Point2f dst_points[4];
int target_height = 0, target_width = 0;
.......
fcv::Mat transform = fcv::get_perspective_transform(src_points, dst_points);
fcv::Mat fcv_src(img_w, img_h, fcv::FCVImageType::PKG_RGBA_F32, imgData.data);
fcv::Mat fcv_dst;
fcv::warp_perspective(fcv_src, fcv_dst, transform);
cv::Mat opencvMat(img_h, img_w, CV_8UC(fcv_dst.channels()),fcv_dst.data());
std::string res_path = "/data/local/tmp/flycv_res.jpg";
cv::imwrite(res_path, opencvMat);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels