Ask Your Question

utkarshmankad's profile - activity

2017-07-19 10:55:20 -0600 received badge  Famous Question (source)
2016-10-11 06:44:33 -0600 received badge  Famous Question (source)
2016-04-16 14:48:44 -0600 received badge  Notable Question (source)
2016-01-06 04:59:07 -0600 received badge  Popular Question (source)
2015-06-09 01:54:59 -0600 received badge  Notable Question (source)
2014-11-06 04:19:34 -0600 received badge  Popular Question (source)
2014-09-12 05:17:15 -0600 commented answer How to display fullscreen in Python on Linux? (setWindowProperty doesn't work)

i tried using this, then the window launches as full screen but the video is same old 640x320. How to change that ?

2013-09-26 02:24:58 -0600 answered a question Possible solutions for OpenCv Assertion Error problem

Thank you very very much. I was successfully able to solve the problem. As per suggestion given by Vladislav Vinogradov and Moster, i modified my earlier condition to check the ROI. The new condition is as follows -

if(roi.x >= 0 && roi.y >= 0 && roi.width + roi.x < input_frame.cols && roi.height + roi.y < input_frame.rows)
{
    // your code

}
else
    return -1;

The assert problem is successfully solved here. Thanks a lot Moster and Vladislav Vinogradov.

2013-09-26 01:55:16 -0600 commented question Possible solutions for OpenCv Assertion Error problem

I am checking the ROI creation line.

2013-09-26 01:54:45 -0600 commented question Possible solutions for OpenCv Assertion Error problem

Thanks Vladimir, I made the changes in my code as you mentioned. I got a slight improvement in performance, but the problem still persists. The cropping is just a small part of the whole functionality. Hence i didn't paste the code involving the dependency.

2013-09-25 23:41:27 -0600 asked a question Possible solutions for OpenCv Assertion Error problem

I am trying to write a simple module for Image Cropping - here's my code

cv::Mat img = input_frame;
cv::Mat finalImg;

// Set Region of Interest to the area defined by the box
int h = input_frame.rows;
int w = input_frame.cols;

cv::Rect roi(skeletonBound[0].x,skeletonBound[0].y,abs(skeletonBound[3].x - skeletonBound[0].x),abs(skeletonBound[3].y - skeletonBound[0].y));

if(!(roi.height <= h) && !(roi.width <= w))
{

    return -1;
}
else
{
    cv::Mat crop = input_frame(roi);
    cv::imshow("crop", crop);
    cv::imwrite("cropped.png", crop);
    cv::Mat finalImg(crop);

    finalImageToBeusedForDetection = finalImg; 
    cout << "Success : "; 
    return 1;
}

I am getting this error -

image description

I checked and rechecked the dimensions, they are correct. i am successfully able to run this code for about early 10-15 frames, later at certain point of time, the code crashes abruptly with above error log. There seems to be a very small problem which i am not able to figure out.

Previously, I was also getting the error where ROI was greater than the size of input image. In that scenario also, the above code worked fine for first 10-15 frames, and later it crashed. I couldn't figure out the problem and hence discarded the erroneous result frame.

I am using latest versions of OpenCv for C++ in Visual studio 2012.

Please help me out on this. I tried all web resources, and have spent pretty lot of time on the same.

2013-08-28 23:33:39 -0600 commented question Are distortion coefficients returned by cv::stereoCalibrate correct?

Refer to OpenCv documentation on Camera calibration - http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html

Please see the equations before watching the code, they would give you logical explanation of the camera calibration process.

2013-08-28 23:21:47 -0600 answered a question What would be an effective way to avoid out of memory in OpenCV android?

If you want to use OpenCv in Android, try using OpenCv4Android SDK -OpenCv for Android. The SDK is very robust, well defined, efficient and gives near Desktop system performance (Android OS Architecture limits performance to certain level for advanced applications, for the application user the difference is unnoticable). The development cycle is simple and quick. I've successfully migrated my applications from OpenCv C++ to OpenCv4Android.

2013-08-27 06:31:15 -0600 commented answer Debugging error in Visual Studio 11 Win8 X64

try rebuilding your opencv library and retry using them.

2013-08-27 04:47:52 -0600 received badge  Supporter (source)
2013-08-27 04:02:11 -0600 answered a question Error with OpenCVLibrary 2.4.6, org.opencv.R not found

Please check weather other projects are running fine or all of them have the same problem. Please check weather Android is properly set up on your IDE, and you have provided a proper path to your Android SDK & OpenCv4Android SDK.

If yes, then check weather there's any old version of debug.keystore file in C:/Users/<your account="" name="">/.android (old as in check the last modified date). If there's any, delete that file and reinstall your Android SDK, that problem would be solved.

2013-08-27 01:58:07 -0600 answered a question What's the best Linux based server OS to run OpenCV?

Red Hat based OS gave me problems to set up OpenCV. i use Ubuntu 12.04 and it runs excellently. Try any Debian based Linux eg-Ubuntu

2013-08-27 01:55:17 -0600 commented question Will this work... Camera calibration without human intervention

As far as your camera is able to detect chessboard pattern like image and the corners, it must be fine.

2013-08-27 01:53:14 -0600 answered a question Can we use OpenCv in VS 2012 ?

There's no problem with OpenCv libraries in either VS 2010 or VS 2012. You get such problem, because you've MSVCP100 compiler dll for VS 2010, where as MSVCP110 compiler dll is needed for VS2012. Upgrade your VS 2010 project in VS 2012. Then on you would be able to use it accordingly.

If that doesn't help, Right click your VS project--> Properties-->Configuration Properties--->General . In that look for entry Platform toolset. It must be 100 for VS 2010 and 110 for VS 2012. Alter it accordingly.

Alternatively, rebuild your OpenCv library for VS 2012 compilers.

2013-08-19 00:26:07 -0600 commented answer void approxPolyDP(const Mat& curve, vector<Point>& approxCurve, double epsilon, bool closed) function closes after 1st iteration.

I changed my version to 2.4.6 and the problem was solved . Thanks a lot :)

2013-07-19 01:09:50 -0600 commented answer opencv_core245d.dll cannot be read by vs12

I also had similar problem, i searched it a lot, and tried updating lot of things, but nothing helped, finally I was able to resolve the problem, by using OpenCv-2.4.4 build. I tried to build the OpenCv 2.4.6 libraries, but CMake gave me some errors. And the prebuilt libraries didn't work. If you are able to successfully build OpenCv-2.4.5 library using CMake, then i guess such problem must not come.

2013-07-19 00:58:15 -0600 asked a question void approxPolyDP(const Mat& curve, vector<Point>& approxCurve, double epsilon, bool closed) function closes after 1st iteration.

I am trying to find out shapes using contours, by using the above mentioned function. I am running the simple example given in the OpnCv Documentation - Create Bounding rectangle example

I tried running this code with OpenCv 2.4.4 build for C++. Strangely, for approximation of polygons. This code crashes after 1st iteration itself.

But, when i use the C implementation of the same - CvSeq* cvApproxPoly(const void* src_seq, int header_size, CvMemStorage* storage, int method, double eps, int recursive=0 ). The code works absolutely fine. Please guide me.

2013-05-23 02:31:08 -0600 commented question How to perform Pose estimation for 3D object rendering in Android

I was able to solve my problem temporarily.

  1. For camera intrinsics and distortion parameters, I clicked photos of chessboard in different angles from the Android mobile, and used these snaps for calibration using a C++ executable (i had a release lined up, so for quick fix)

  2. For POSE estimation, the current C++ and Java API use the function -

Calib3d.solvePnP(MatRealCorners, MatImgCorners, camera_matrix, distortion_coeffs, rotation_vector, translation_vector,false,0);

for pose estimation. You can check OpenCv Wiki for explanation.

Now, i am stuck at obtaining Projection matrix for 3D rendering.

2013-05-07 05:52:54 -0600 asked a question OpenCv4Android analogy for OpenCv C constructs

I am writing a piece of code, where few of the important code statements are part of the legacy code, the C constructs.

Please help me provide appropriate OpenCv4Android analogy for these functions in C presnt in OpenCv4Android.

FileStorage

FileNode

CvInitMatHeader

CvInitImageHeader

Thanks in Advance !!

2013-05-05 22:55:09 -0600 commented question POSE estimation in OpenCv Java using cvFindExtrinsicsCameraParams2

I would be able to help you, if you're trying this out in C++. In Android, its getting difficult as the developers have tweaked many APIs for simplification. They would have definitely done something for POSE estimation as well.

2013-05-04 07:40:49 -0600 asked a question POSE estimation in OpenCv Java using cvFindExtrinsicsCameraParams2

I am trying to perform POSE estimation using SIFT algorithm, using the already given method in OpenCv C++ -

cvFindExtrinsicCameraParams2( const CvMat* object_points, const CvMat* image_points, const CvMat* camera_matrix, const CvMat* distortion_coeffs, CvMat* rotation_vector, CvMat* translation_vector, int use_extrinsic_guess CV_DEFAULT(0) );

I am successfully able to do it in C++ program.

I want to port this same program into an Android application.While doing this, I am not able to find the analogous method for above given function on OpenCv java.

Please help me to find the analogous method for the OpenCv function mentioned above. Also,Please suggest me any other alternative to perform POSE estimation using SIFT.

Thanks in advance

2013-05-03 00:01:13 -0600 asked a question How to determine the number of Chessboard corners found in CameraCalibration

I am trying to calibrate mobile camera, by writing a code in OpenCv4Android. I am trying to find out the chessboard corners using the function -

public static boolean findChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners, int flags)

I am using this method in my code. The problem i am facing is, For every frame the return value of this method is coming false, even if the chessboard corners are properly put into the camera view. i want to debug my application, to see how many chessboard corners have been determined.

Can you please guide me in performing the action, also please guide me in performing the camera calibration for Android mobile using OpenCv4Android. Can you please suggest me some blog which has tried to implement this in OpenCv4Android ? Or any sample code.

Thanks in Advance !!

2013-04-30 09:41:52 -0600 received badge  Student (source)
2013-04-15 02:00:03 -0600 asked a question How to perform Pose estimation for 3D object rendering in Android

I am developing a simple AR application which renders a 3D image on top of camera view. I could successfully implement that in Windows 7.I used OpenCv's native POSE estimation functions which internally uses POSIT algorithm, so as to give Translation, Rotation matrix, which could be applied on the the 3D modal.

I want to implement the same functionality in an Android application. The problem I am facing is, one of the arguments to the POSE estimation function is the Camera intrinsic and distortion parameters. Which i am not able to find out. I tried studying various AR platforms - AandAR, ARToolKit etc. But after reverse engineering their Sources, i could get to any conclusion about usage of these in POSE estimation.

Please suggest me an appropriate method for POSE estimation (if it involves camera distortion parameters, then how would i determine it) and hence 3D object rendering over camera view in an Android application

2013-04-10 00:25:42 -0600 commented answer How to calibrate the camera of my mobile device?

You can get a ready recknor program for the same in the Codes of the book - O'Riely Learning OpenCv

Also the OpenCv Doc link is here - http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html

2013-04-09 06:51:27 -0600 commented answer Confusion between OpenCv4Android and C++ data types

Thanks a lot, Andrey Pavlenko, this is exactly what I was looking for. Thank you very much

2013-04-09 06:48:17 -0600 received badge  Scholar (source)
2013-04-08 09:03:47 -0600 asked a question Confusion between OpenCv4Android and C++ data types

I am trying to write some applications using OpenCv4Android for Android devices. Earlier, i was using Android NDK and C++ native codes. But that technique wasn't much lucid. So i switched over to latest Java API coming along with OpenCV 2.4.4 version.

I was able to write simple programs and run samples. But, while i tried to write some codes for advanced problems like - Model POSE estimation, Camera calibration routines etc, I came across this very strange confusion. Some of the data types whose names are very intuitive in C++ API doesn't really fit in in their Java counterpart. Hence, I am facing terrible difficulty to port my functionality from C++ to Java. I am facing utter confusion in these functions

  • Point2f (in C++ ) - MatOfPoint2f (in Java)
  • Point3f (in C++) - MatOfPoint3f (in Java)
  • Point2 (in Java)
  • Point3 (in Java)

Please help me understand the terms used in OpenCV Java and its analogy with C++.

Also, please suggest me some reference where, clear and crisp description of these terms are given (i tried watching the help provided along, but it didn't help me much, as it was somewhat similar for both C++ and Java).