Ask Your Question

Mehdi.'s profile - activity

2015-10-14 18:38:13 -0500 received badge  Student (source)
2015-09-15 07:02:26 -0500 commented question Opencv 3 and 2 on the same computer

Yes it is always 2.4.8 no matter what I do, I exported the dist-packages of opencv 3.0 to the beginning of PYTHONPATH and I exported the opencv 3 libs path to the beginning of LD_LIBRARY_PATH, and I am running python after setting those env variables, still python is always importing 2.4.8

2015-09-15 04:26:04 -0500 commented question Opencv 3 and 2 on the same computer

What should I do with that link?

2015-09-15 04:24:31 -0500 received badge  Supporter (source)
2015-09-15 04:05:58 -0500 asked a question Opencv 3 and 2 on the same computer

Because I am using a lot of stuff based on opencv 2 (ex. ROS and Gazebo) and installing opencv 3 will simply destroy everything, I downloaded the source code of opencv 3 , compiled it and installed it to a local folder in my home directory. Now I want to use that version when running python scripts. What do I need to change? And isn't there any option to make an alternative name spacing on opencv3 ? like for example doing "import cv2_3" in Python?

Using Ubuntu 14.04

2015-09-01 10:57:14 -0500 commented question I cannot recover my account

Is that a suggestion for the future or a hint

2015-09-01 09:20:06 -0500 commented question I cannot recover my account

the one with the space guy

2015-09-01 09:00:05 -0500 asked a question I cannot recover my account

I forgot my password and I get no recovery email, nothing in spam or anywhere else. How can I recover my old account?

2015-09-01 08:59:29 -0500 asked a question Image undistortion in python

I calibrated my camera and undistorting in C++ works with no problem, using initUndistortRectifyMap(), undistort(). However, doing exactly the same in Python, the resulting image is still distorted. Here is how I do:

In C++:

cv::Mat I = cv::Mat_<double>::eye(3, 3);
                            cv::Size(img_width, img_height),
cv::remap(src, dst, rect_map_x_, rect_map_y_, INTER_LINEAR, BORDER_CONSTANT);

In python:

cv_image_rect = cv2.undistort(cv_image_small, self.K, self.D, None, self.K)


self.map1, self.map2 = cv2.initUndistortRectifyMap(self.K, self.D, np.identity(3), self.K, (self.image_shape[1], self.image_shape[0]), cv2.CV_32FC1)
cv_image_rect = cv2.remap(cv_image_small, self.map1, self.map2, cv2.INTER_LINEAR, None,  cv2.BORDER_CONSTANT)

I also tried with and without newCameraMatrix but no difference, the resulting image in Python is always distorted. Why is that?