Ask Your Question

Lacrymology's profile - activity

2019-11-12 13:39:51 -0500 received badge  Notable Question (source)
2015-08-22 07:46:42 -0500 received badge  Taxonomist
2012-07-24 02:25:54 -0500 received badge  Teacher (source)
2012-07-24 02:25:54 -0500 received badge  Self-Learner (source)
2012-07-23 10:58:34 -0500 commented question 1D blobs with MSER

@Misha: I can't yet comment onto your answer. I'm using MSER because I wasn't able to find a more suitable algorithm that I don't need to implement myself, I'm very short on time, so, well I came to OpenCV.. I'll look into these

2012-07-23 10:53:39 -0500 answered a question Segfault on feature detection

OK, the problem was that MSER accepts only types CV8UC1 and CV8UC3

2012-07-23 10:19:38 -0500 asked a question Segfault on feature detection

Hello, I'm trying to use MSER in a kinect code I have, but it's segfaulting inside the code, and I'm not sure why.

This is the code, and it's all the calls to CV I have. My first idea was to detect blobs in 1D but there doesn't seem to be a way of doing it. I tried running MSER with a 1x320 Mat but that failed, I figured it might be because of the 1x Mat didn't work for the algorithm. I widened it to 7x but it still fails.

cv::Mat depthLine(7, frameWidth, CV_16UC1);
USHORT *dlRun = (USHORT *);

for( ; pBufferRun < pBufferEnd ; pBufferRun++, rgbrun++, dlRun++) {
    *dlRun = NuiDepthPixelToDepth(*pBufferRun);

//CvMSERParams params = cvMSERParams;
cv::MserFeatureDetector mser;
vector<cv::KeyPoint> keypoints;
mser.detect(depthLine, keypoints);   // segfault on bad memory access here

Maybe this isn't the smartest way to do the buffer conversion, but that's not the point right now, why is that detection failing? am I missing some kind of initialization?

And since we're at this, is there a way I can have CV TRACK the features (link one frame's to the next) after detecting them?

If it helps, apparently a malloc within the library is failing, it's trying to alloc 7399104 bytes and malloc is returning 0x0070e6c0 (clearly not a good pointer)

2012-07-20 13:14:15 -0500 received badge  Good Question (source)
2012-07-20 12:54:39 -0500 commented answer How to Create an image from pixels in memory?

how did you know this was a depthFrame?

2012-07-20 12:45:49 -0500 received badge  Scholar (source)
2012-07-20 11:28:17 -0500 received badge  Popular Question (source)
2012-07-20 10:17:34 -0500 received badge  Nice Question (source)
2012-07-20 10:12:25 -0500 received badge  Editor (source)
2012-07-20 10:09:43 -0500 commented answer How to Create an image from pixels in memory?

Oh! wait, just to get clear.. this is video (image stream) data. Is there a better way to do it in this case?

2012-07-20 10:08:41 -0500 commented answer How to Create an image from pixels in memory?

Great, no I'll copy it because I want to use just one or two lines of the original image (well, maybe I could do Mat depthFrame(2, cols, CV16UC1, depthMap + linewidth * SELECTEDLINE)).

2012-07-20 10:07:00 -0500 received badge  Supporter (source)
2012-07-20 09:59:37 -0500 received badge  Student (source)
2012-07-20 09:45:31 -0500 asked a question How to Create an image from pixels in memory?

How can I create an image from an array of bytes (or even better u16)? I'm having a hard time going through the docs, sorry for the n00b question

By the by, this is to be used for video (blob tracking on a depth field)

2012-07-20 09:42:28 -0500 asked a question 1D blobs with MSER

I have to clarify, I haven't even tried to compile an example yet, but I want to know whether I'm barking up the right tree or not.

I'm trying to detect some blobs in 1D in order to detect where are the legs in a single line of kinect depth map input. From what I've read around, it sounds like MSER is my best option here, although I don't know how well will it work with a single-line image, although I could make it as wide as 4 or 8 lines, the idea is not to depend on skeleton detection because that has too many prerequisites, and I want this to work with an arbitrary amount of people.

I decided to try OpenCV because writing the algorithm myself looked like overkill. I come here because I wasn't able to find any documentation that actually says something =/

What would be the right path to take here? I take I'll need to adjust the params so the algorithm is quite sensitive, since the data will represent mm and after threshold it'll range only between 800~1800