Ask Your Question

MichaelHecht's profile - activity

2018-05-01 15:04:35 -0600 received badge  Notable Question (source)
2017-08-10 10:09:57 -0600 received badge  Popular Question (source)
2017-05-25 09:33:33 -0600 received badge  Famous Question (source)
2016-11-17 06:58:16 -0600 received badge  Notable Question (source)
2016-09-19 08:42:46 -0600 asked a question Really need cv2.adaptiveBilateralFilter

Hi,

obviously someone thought, that cv2.adaptiveBilateralFilter is no longer needed. Well, I need it definitely, because changing to bilateralFilter gives totally different results for my image processing application. Is there any chance to get cv2.adaptiveBilateralFilter back in OpenCV 3.x?

2016-08-18 03:22:51 -0600 received badge  Student (source)
2016-01-20 08:16:33 -0600 received badge  Popular Question (source)
2014-10-31 04:43:09 -0600 received badge  Editor (source)
2014-10-31 04:37:06 -0600 commented answer getting area points inside contour

I found a solution now for my original Problem and added it to my question, since I'm not allowed (as new user) to answer my own question.

2014-10-30 16:34:27 -0600 commented question getting area points inside contour

I'm working with Python, so speed is not available for me and I need to use pure OpenCV and numpy implementations.

2014-10-30 16:31:14 -0600 commented answer getting area points inside contour

Well, this seems to be slightly complicated. In detail: I need to calculate the mean and stdev of the gray values inside one contour for dozens of contours. Marking the points in a mask via drawContours and then getting the points in the image for my calculation (how?) and then deleting the mask and stating with the next may be quite inefficient. Could you add a code snippet for me (I'm rather new to OpenCV)?

2014-10-30 10:21:38 -0600 commented question getting area points inside contour

Yes. cv2.contourArea() only delivers the size of the area, i.e. number of pixels, but not the pixels itself. If I want to do some processing of the area, I need the pixels with its positions, colors or graylevels.

2014-10-30 08:17:20 -0600 asked a question getting area points inside contour

Hello,

is it possible not only to get the area inside a contour but also the corresponding points of the area?

EDIT -- Answer to my original problem (see below):

def getContourStat(contour,image):
  mask = np.zeros(image.shape,dtype="uint8")
  cv2.drawContours(mask, [contour], -1, 255, -1)
  mean,stddev = cv2.meanStdDev(image,mask=mask)
  return mean, stddev

Even if I dont get the points itself, I get the statistics I need. Nevertheless I think it's quite inefficient for many contours.

2014-10-28 10:38:42 -0600 commented answer Correct barrel distortion without reference images

Yes, I'm sure You are right but I don't really get it. Using only one main parameter (with imagemagick) is much simpler and doesn't need any deeper understanding of transformation matrices. Maybe you have some code snippets (in Python)? Thanks in advance.

2014-10-28 10:05:05 -0600 commented answer Correct barrel distortion without reference images

So your suggestion is to build my own mapping and provide this to remap function? This seems to be quite slow in execution (in Python). That's the reason I wanted to apply a "real" OpenCV function.

2014-10-28 04:25:56 -0600 asked a question Correct barrel distortion without reference images

Hello,

I want to correct a simple barrel distortion whithout using calibration images. In imagemagick-convert I just call e.g. convert img -distort Barrel "0.0 0.0 -0.1 1.0". This is sufficient for my camera. In OpenCV it seems to be much more complicated than this.

Is there any easy way comparable to imagemagick to do this simple distortion correction? I just want to avoid calling imagemagick from my python script since OpenCV should be able to do the entire job.

Thanks in advance.