Ask Your Question

lohachan0108's profile - activity

2017-06-15 01:53:30 -0600 asked a question LUCID does not work

I am extracting keypoints using StarDetector. I am trying to compute descriptors using LUCID but I am getting the following error. Can anyone please explain why I am getting this error?

OpenCV Error: Assertion failed (!fixedType() || ((Mat)obj)->type() == mtype) in create, file /home/shubham/opencv-3.0.0/modules/core/src/matrix.cpp, line 2130 terminate called after throwing an instance of 'cv::Exception' what(): /home/shubham/opencv-3.0.0/modules/core/src/matrix.cpp:2130: error: (-215) !fixedType() || ((Mat)obj)->type() == mtype in function create

2017-06-12 23:34:50 -0600 commented answer Modifying inpainting to achieve proper blur

Create a mask only for facial features such as eyes. Not the entire face. Creating for the entire face does not guarantee proper blurred regions for inside the face.

2017-06-12 05:15:03 -0600 answered a question Modifying inpainting to achieve proper blur

This cartoonised image does not work as a proper mask. You need to create a mask for your eyes and other facial features if you want to remove them. Create a binary mask (maybe you can use MS Paint or for more accurate results you can use Photoshop) painting your facial features black and the rest as white. Pass it as the second argument and it will blur out all your facial features. Hope it helps :)! This is the photo from which I want to blur the kid. This is the mask I use to blur it. This is the final result I get on using a binary mask.

2017-06-12 01:38:20 -0600 asked a question Unable to run programs of SFM (Structure From Motion) module

I am getting an error when I am trying to execute a sample code in SFM module. Initially SFM was not present in my contrib directory. So i downloaded the latest contrib and pasted the sfm folder in my contrib directory. I used the CMakeLists.txt that was present in the sfm module. Then I tried to build it in my own directory with scene_reconstruction.cpp and the CMakeLists.txt which I took from the sfm module. Following is the error which I am getting

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found installed version of Eigen: /usr/lib/cmake/eigen3
-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE
-- Performing Test GFLAGS_IN_GOOGLE_NAMESPACE - Success
-- Found required Ceres dependency: gflags
-- Found Ceres version: 1.13.0 installed in: /usr/local with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations, OpenMP]
-- Checking SFM deps... TRUE
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen
CMake Error at CMakeLists.txt:35 (ocv_module_disable):
  Unknown CMake command "ocv_module_disable".
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as
cmake_minimum_required(VERSION 3.5)
  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!

PS: I went through all the required downloads of the libraries mentioned in the SFM documentation page before starting off.

2017-06-07 23:20:08 -0600 commented question The hausdorff distance is not zero even when 2 same images are passed

Yes. I am using jpg images. If not jpg, what images should I use?

2017-06-07 23:18:48 -0600 commented answer The hausdorff distance is not zero even when 2 same images are passed

No. I have done it in openCV. The value is less, say a single digit, but is never zero.

2017-06-07 05:11:51 -0600 received badge  Scholar (source)
2017-06-07 05:11:45 -0600 answered a question The hausdorff distance is not zero even when 2 same images are passed

The hausdorff considers the worst matchin pairs in the two images. Hence it never returns a zero value. Whereas the shapeContextDistanceExtractor returns a zero value when 2 same images are passed.

2017-06-07 05:09:38 -0600 received badge  Supporter (source)
2017-06-07 02:29:27 -0600 answered a question Can't seem to use OpenCV

Hello. As per your question, I guess that you have installed OpenCV but are having problem while compiling and running the code. Here are steps you should follow. 1. Name your .cpp file as main.cpp 2. Create a .txt file and name it as CMakeLists.txt 3. In the CmakeLists.txt file paste the following lines

" cmake_minimum_required(VERSION 2.6) cmake_policy(SET CMP0012 NEW) PROJECT(project)

#Requires OpenCV FIND_PACKAGE(OpenCV 3.0.0 REQUIRED) MESSAGE("OpenCV version : ${OpenCV_VERSION}")

include_directories(${OpenCV_INCLUDE_DIRS}) link_directories(${OpenCV_LIB_DIR}) ADD_EXECUTABLE(app main.cpp) TARGET_LINK_LIBRARIES(app ${OpenCV_LIBS}) " without the doublequotes at the start and the end. Save the file.

  1. Now open the terminal and go to the directory where these file are stored. And in the terminal type "cmake ." ,without the doublequotes.
  2. Now in the terminal type "make" and press enter.
  3. It will compile and generate an executable file name app
  4. Execute the app file using ./app
  5. Hope it helps.
2017-06-06 05:39:52 -0600 answered a question Remove noise image?

You can use fastNlMeansDenoising or fastNlMeansDenoisingColored function in OpenCV to remove gaussian white noise or colored noise respectively. Hope it helps.

2017-06-06 01:30:59 -0600 received badge  Necromancer (source)
2017-06-06 01:22:01 -0600 answered a question denoise_TVL1 not working?

Hello. It seems you are passing one image in I. But the first argument for denoise_TVL1 is a vector of images. Try passing vector of images rather than a single image. Hope it helps.

2017-06-02 00:57:27 -0600 asked a question The hausdorff distance is not zero even when 2 same images are passed

I am passing 2 same images in hausdorff and shapeContextDistanceExtractor to calculate distance. We are expecting the answer to be zero since the images are same but we are getting a non-zero value. Can somebody please explain why.

            // Hausdorff Distant Extractor

            Ptr<HausdorffDistanceExtractor> model = createHausdorffDistanceExtractor();

            dist = model->computeDistance(c1, c2);

I am passing 2 images and extracting the points using samplecounters. Here c1 and c2 are the vector of countour points which are passed to the computeDistance function. The 2 images that I pass are same yet the distance I am getting in dist is non-zero. Please help.

2017-06-02 00:47:30 -0600 received badge  Enthusiast
2017-05-30 01:39:46 -0600 received badge  Editor (source)
2017-05-29 23:49:50 -0600 asked a question In the Histogram Cost Extractor module, what does the values returned by buildcostMatrix function signify?

I am using buildcostMatrix function and passing it 2 arguments which are the descriptors of two images. I am getting a matrix of double. But it is very huge and therefore hard to comprehend. Can anyone please explain how to make sensible information out of the huge matrix which is returned by the function?

void buildCostMatrix (InputArray descriptors1, InputArray descriptors2, OutputArray costMatrix)

2017-05-24 23:44:45 -0600 asked a question How can I use the NormHistogramCostExtractor class? What function do I need to call to extract the cost? What are the arguments to be passed ?

What does norm based cost extraction mean? Do I have to normalize the histogram and then pass the normalized histograms for cost extraction as in EMDL1 or anything else? Please provide suggestions.

2017-05-24 23:32:27 -0600 commented answer How is the EMDL1() function different from EMD() function in OpenCV?

Thanks for the explanation. It was really helpful.

2017-05-24 06:30:26 -0600 asked a question How is the EMDL1() function different from EMD() function in OpenCV?

What is the difference between EMDL1() and EMD() function in OpenCV? What does 'L1' signify? Please provide suggestions.