Ask Your Question

Linda's profile - activity

2013-12-10 18:18:07 -0600 asked a question Why some formats of cv2.Sobel give out wrong results?

I am using Python cv2.Sobel to calculate sobel results for an image.

I am using OpenCV 2.4.2, Python 2.7, Ubuntu 12.04 From its reference manual, the command should be: Python: cv2.Sobel(src, ddepth, dx, dy[, dst[, ksize[, scale[, delta[, borderType ]]]]])! dst

But if I use: gray_part_sobel = np.zeros(gray_part.shape,np.float64) gray_part_sobel = cv2.Sobel(gray_part, cv2.CV_64F, 1, 1, gray_part_sobel,3) or gray_part_sobel = cv2.Sobel(gray_part, cv2.CV_64F, 1, 1, ksize =3)

gray_part_sobel = cv2.Sobel(gray_part, -1, 1, 1)

gray_part_sobel = cv2.Sobel(gray_part, cv2.CV_64F, 1, 1)

The results seem not desired. If I use: gray_part_sobel = cv2.Sobel(gray_part,cv2.CV_64F,1,0,ksize = 3, scale = 1, delta = 0,borderType = cv2.BORDER_DEFAULT)

Then the result looks desired.

Why is it this way?

(And BTW, I find the format of arguments for OpenCV Python functions are not clear. Many times I get errors when the argument require list or tuple or something else. Is it possible to specify argument formats for OpenCV Python functions?)

2013-08-30 12:14:27 -0600 commented answer What would be an effective way to avoid out of memory in OpenCV android?

Thanks. Do you think the available NDK memory is the total physical memory, minus: memory used by the system, memory used by applications?

2013-08-29 00:25:12 -0600 commented answer What would be an effective way to avoid out of memory in OpenCV android?

Thanks. I have used OpenCV4Android SDK, and developed one application. However, I want to know the limitation of memory. Any idea? Thanks.

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

I want to use OpenCV android in JNI in my Android application. What would be an effective way to avoid out of memory in OpenCV android?

The below is one way I am considering. But not sure whether is good or feasible. For example, I have an input image file. The desired size would be 3000x2000.

So I try to estimate the whole memory the JNI might use. Then I will use one method (which one? For example, allocate memory and then delete: does it takes a long time) to see whether there is sufficent memory. If not, then I will downsize the size of the image to be processed (the downsized size is not desired, but still acceptable).

Is there any better way? Thanks in advance!