Ask Your Question

Valentina Kustikova's profile - activity

2020-10-22 15:04:48 -0600 received badge  Nice Question (source)
2018-05-04 20:39:06 -0600 received badge  Popular Question (source)
2017-11-04 01:39:03 -0600 received badge  Enlightened (source)
2012-10-17 06:25:38 -0600 commented answer How can I specify row alignment reading an image or creating Mat object?

Thanks, Daniil! Actually, I have another question connected with those subject. I wanted to create Mat object using create(...) method with particular stride (or step if to talk in terms of constructor parameters). Is there a way to create such object without calling Mat constructor with parameters? It looks like strange when we have constructor but we don't have simular method create(...).

2012-10-17 04:28:51 -0600 received badge  Student (source)
2012-10-17 03:31:08 -0600 asked a question How can I specify row alignment reading an image or creating Mat object?

Hello, I need to specify row alignment reading an image. I can do it by hands computing new width in accordance with particullar stride (source code you can find below).

Mat srcImg, alignedImg, roiImg;
Size size;
// read initial image
srcImg = imread(argv[1]);
// compute new width (aligment with the stride = 32)
size.width = ((srcImg.size().width - 1) & -32) + 32;
size.height = srcImg.size().height;
// create new image
alignedImg.create(size, srcImg.type());
// adjust ROI
roiImg = alignedImg.adjustROI(0, 0, 0, srcImg.size().width - size.width);
// copy initial image into ROI
srcImg.copyTo(roiImg);

// release memory
srcImg.release();
alignedImg.release();

Is there a way to set row alignment reading an image or creating Mat object automatically without additional memory allocation and copying data?

Thanks!

2012-06-30 12:36:54 -0600 received badge  Good Answer (source)
2012-06-30 12:03:44 -0600 received badge  Nice Answer (source)
2012-06-29 13:37:49 -0600 received badge  Teacher (source)
2012-06-29 13:33:18 -0600 received badge  Editor (source)
2012-06-29 13:32:25 -0600 answered a question HOG latent SVM obj detection doesn't seem to work

Hello, I'll try to answer some of your questions.

  1. Nobody says that algorithm provides exact detection outcome. If you open Felzenschwalb's article you see that average precision for object class 'person' equals 0,342. Evidently it's not so good as you waiting for. Concerning too many false positives you can decrease number of false positives decreasing detection threshold in function cvLatentSvmDetectObjects (by default thershold equals 0.5).
  2. Have you tried to execute Felzenshwalb's implementation? If you haven't done I'm ready to do that and compare results to satisfy results similarity or to find out a bag. Please, choose image from VOC2007.
  3. Execution time depends on many conditions, first of all: what version you use (sequential or parallel), how many threads you create during execution if you have multi-core processor, size of test image.

Note that Felzenschwalb's implementation is a multi-threading implementation. Besides authors don't tell about infrastructure in their paper. That's why it's not quite correct to compare execution time of those implementations. OpenCV implementation in 4 threads works about 4 seconds in average (on VOC2007 data, where image size is about 640x480, OS - Microsoft Windows Server 2008 Standard SP1 x64, RAM - 4Gb, Processor - 2 processors Intel Xeon 5150 (2.66 GHz)).

Latent SVM documentation you can find here. More over there are two samples (latentsvm_multidetect, latentsvmdetect) and comments to source code in accordance to the notation of the paper.

2012-06-29 13:28:40 -0600 answered a question HOG latent SVM obj detection doesn't seem to work

Hello, I'll try to answer some of your questions.

  1. Nobody says that algorithm provides exact detection result. If you open Felzenschwalb's article you see that average precision for object class 'person' equals 0,342. Evidently it's not so good as you waiting for. Concerning too many false positives you can decrease number of false positives decreasing detection threshold in function cvLatentSvmDetectObjects (by default thershold equals 0.5).
  2. Have you tried to execute Felzenshwalb's implementation? If you haven't done I'm ready to do that and compare results to satisfy results similarity or to find out a bag. Please, choose image from VOC2007.
  3. Execution time depends on many conditions, first of all:
  4. what version you use (sequential or parallel)
  5. how many threads you create during execution if you have multi-core processor
  6. size of test image Note that Felzenschwalb's implementation is a multi-threading implementation. OpenCV implementation in 4 threads works about 4 seconds in average (on VOC2007 data, where image size is about 640x480, OS - Microsoft Windows Server 2008 Standard SP1 x64, RAM - 4Gb, Processor - 2 processors Intel Xeon 5150 (2.66 GHz)). Besides authors don't tell about infrastructure in their paper. That's why it's not quite to compare execution time of those implementations.

Latent SVM documentation you can find here. More over there are two samples (latentsvm_multidetect, latentsvmdetect) and comments to source code in acordance to the notation of paper.