Ask Your Question

ej's profile - activity

2016-05-16 04:41:07 -0500 commented question ORB harris corner detection matrix

Don't fully understand your question. You can look at this tutorial: Harris Corner Detection Or just google it: Wikipedia-Corner Detection

2015-12-07 13:32:19 -0500 commented question HDR fusion (Mertens) gives different results in Python Vs. C++

Yes, the problem was indeed overflow. The result of the fusion have values lower the 0 and larger then 1 (bug?) If I clip them before converting to CV8U the problem disappear.

2015-12-06 04:21:46 -0500 received badge  Editor (source)
2015-12-06 04:21:06 -0500 asked a question HDR fusion (Mertens) gives different results in Python Vs. C++

When I run the HDR Mertens exposure fusion in Python I get weird colors artifact, that I don't get when I run the exact same function in c++. (I just run the HDR Tutorial)

Seems to me like some problem with the data types, but I tried every option and nothing works. Am I doing something wrong?

I'm running Python 3.5 64-bit with OpenCV 3.0.0.

The exposures images were taken from Wikipedia: 1/30 sec, 1/4 sec, 2.5 sec, 15 sec.

The Python code:

import cv2
import numpy as np

img_fn = ["640px-StLouisArchMultExpEV+4.09.jpg",
img_list = [cv2.imread(fn) for fn in img_fn]

# Exposure fusion using Mertens
mergeMertens = cv2.createMergeMertens()
resFusion = mergeMertens.process(img_list)

# Convert datatype to 8-bit and save
resFusion_8bit = np.uint8(resFusion*255)
cv2.imwrite("fusion.png", resFusion_8bit)

The result I get in Python:

image description

The result I get in C++:

image description

2015-10-14 11:48:05 -0500 received badge  Enthusiast
2015-10-04 06:38:01 -0500 answered a question Please help me , to initialize opencv 3.0 to android studio...

See: Android Studio 1.4 and OpenCV 3.0.0

I just followed the instructions there and it workd for me.

2014-10-31 09:19:20 -0500 answered a question Machine Learning Labels

Not important.

From the User guide of CvStatModel:

Responses are usually stored in a 1D vector (a row or a column) of CV_32SC1 (only in the classification problem) or CV_32FC1 format, one value per input vector. Although, some algorithms, like various flavors of neural nets, take vector responses.

For classification problems, the responses are discrete class labels.

2014-10-31 08:26:33 -0500 commented question How To Load Large Image About 10g

Can't you work on smaller patches of the bigger image? In Matlab you can call imread with PixelRegion, and load only subsection of the image, but I haven't seen this feature in OpenCV...

2014-10-31 06:46:21 -0500 answered a question How to put colors over a 1 channel gray image?

Suppose you already have the contours BGR image, by using drawContours for example. Then you can combine your 2 images by Bitwise Operations (The answesr it taken basically from the python tutorials).

Just make sure first to convert your original grayscale image to BGR and then you can do something like this:

img1 = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)    
img2 = contours_img

# Create a mask of contours and create its inverse mask also
img2gray = cv2.cvtColor(img2,cv2.COLOR_BGR2GRAY)
ret, mask = cv2.threshold(img2gray, 10, 255, cv2.THRESH_BINARY)
mask_inv = cv2.bitwise_not(mask)

# Now black-out the area of contours in original image
img1_bg = cv2.bitwise_and(img1, img1, mask = mask_inv)

# Take only region of contours from contours image.
img2_fg = cv2.bitwise_and(img2, img2, mask = mask)

# Put contours in image and modify the main image
dst = cv2.add(img1_bg,img2_fg)    
2014-09-04 12:53:21 -0500 received badge  Student (source)
2014-08-26 02:50:20 -0500 answered a question how to detect face occluded image??

I think the problem you give here is very broad and you need to start by narrowing it to some small problems. For example, are you talking about images or live video?

To find some known object in image you can try to implement some kind of features matching algorithm. The main idea is: - Extract useful features from images of people with helmet/mask - Learn what are the main features unique to person with helmet/mask - Find the same features in new image

Have a look at the feature2d and objdetect modules tutorials, there is a lot of information about features there.

2014-08-26 01:08:16 -0500 asked a question OpenCV 3.0 and VS2012 linking error

I'm using the pre-built libraries, linking them as explained in the tutorial for the 2.4.9 version (I changed the numbers of libraries course).

I keep getting one link error for the highgui300.lib:

1>opencv_highgui300.lib(window_w32.obj) : error LNK2001: unresolved external symbol __imp_CreateToolbarEx

I've read somewhere about similar error where adding the windows comctl32.lib library solved the problem, but in my case I get an unhandled exception after adding it.

Does anyone succeed to work with OpenCV 3.0 and VS2012 without getting this error?

2014-08-21 01:59:48 -0500 received badge  Scholar (source)
2014-08-20 15:02:47 -0500 asked a question Python-tutorials mistakes

I've seen the camera python-opencv pose estimation tutorial the following use in cv2.line:

    img = cv2.line(img, corner, tuple(imgpts[1].ravel()), (0,255,0), 5)

which didn't work, because cv2.line returns None. It worked fine when I just removed the assigning.

In addition, I think similar problem in the same tutorial:

corners2 = cv2.cornerSubPix(gray,corners,(11,11),(-1,-1),criteria)

which gives None according to the API. I guess it just suppose to update corners.

I'm really new to OpenCV, so I am not sure but I think those are mistakes (or old version) which need to be fixed, especially in a beginner tutorials.

Can I fix them without working with push/pull through git?