Comments (2)
@dkurt After reproducing the issue and reading the error log I went to read at
void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints, InputArray _rvec, InputArray _tvec, InputArray _K, InputArray _D, double alpha, OutputArray jacobian)
Then I went on the read the implementation of
int cvRodrigues2( const CvMat* src, CvMat* dst, CvMat* jacobian CV_DEFAULT(0) );
I can't point to any possible reasons of the error. Can you tell how to go about searching the reason of the above issue?
from opencv.
Steps to reproduce in C++:
#include <iostream>
#include "opencv2/core.hpp"
#include "opencv2/calib3d.hpp"
int main( int argc, char* argv[] )
{
using type = float;
cv::Mat objectPoints = (cv::Mat_<type>(3,3) << 181.24588 , 87.80361 , 11.421074,
87.17948 , 184.75563 , 37.223446,
22.558456, 45.495266, 246.05797);
cv::Mat rvec = (cv::Mat_<type>(3,3) << 0.9357548 , -0.28316498, 0.21019171,
0.30293274, 0.9505806 , -0.06803132,
-0.18054008, 0.12733458, 0.9752903);
cv::Mat tvec = (cv::Mat_<type>(3,1) << 69.32692 , 17.602057, 135.77672);
cv::Mat cameraMatrix = (cv::Mat_<type>(3,3) << 214.0047 , 26.98735 , 253.37799,
189.8172 , 10.038101, 18.862494,
114.07123 , 200.87277 , 194.56332);
cv::Mat distCoeffs = cv::Mat_<type>(4, 1, (type)0);
cv::Mat out;
cv::projectPoints(objectPoints, rvec, tvec, cameraMatrix, distCoeffs, out);
std::cout << out;
return 0;
}
It works when type = double
and throws an error when type = float
.
The reason of the issue is that r_vec
is of type CV_32F, while _r
is of type CV_64F:
opencv/modules/calib3d/src/calibration.cpp
Lines 609 to 610 in b8ec949
from opencv.
Related Issues (20)
- Suggestion for a more explicit `version_string.tmp` filename HOT 4
- Version 4.9 οΌThe inference results of the ONNX model differ between GPU inference and CPU inference. HOT 7
- GaussianBlur different results between c++ and python HOT 2
- wrong γγ
- python cv2.norm() on any images hangs - deadlock? HOT 8
- videoio: obsensor: OB_EXT_CMD10 is defined, but unused.
- [regression between 4.6.0 and 4.9.0] Build breaks on FreeBSD/arm64: modules/core/src/system.cpp:573:13: error: unknown type HOT 1
- OpenCV(5.0.0-pre) Error: Unsupported format or combination of formats (Failed to parse onnx model from in-memory byte array.)
- Add equalizeHist to OpenCV HAL
- Cover NormHamming with accuracy and perfomance test
- Strange behaviour with OpenVINO and int64 custom layers
- Some dnn tests doesn't work with OpenVINO 2024.0.0 HOT 1
- OpenCV specify environment variables inside python file wrong documentation (OPENCV_FFMPEG_READ_ATTEMPTS) HOT 7
- Can not set trackBarPos, if two trackbar in the same window HOT 7
- Off by ~0.5 pixel error in `cv2.aruco.CharucoDetector` compared to `cv2.findChessboardCorners`
- cv_hal_minMaxIdx has no channel count argument
- bug when build opencv: QT 6.7, UNICODE, __itt_domain_create HOT 3
- AttributeError: module 'cv2.optflow' has no attribute 'writeOpticalFlow' HOT 2
- findHomography returns bad homography and ouliers in the inlier mask HOT 2
- Several videoio MPEG encoding tests fails with Gstreamer on Ubuntu 24.04
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv.