Ask Your Question

[email protected]'s profile - activity

2019-11-08 18:00:54 -0600 commented answer How to execute sift() in python 3.6

i did the pip install but it still says there is no module xfeatures2d module 'cv2.cv2' has no attribute 'xfeatures2d'

2019-03-24 06:59:42 -0600 received badge  Notable Question (source)
2017-09-08 12:26:15 -0600 answered a question How do the rho and theta values work in HoughLines?

Rho is the size of the 'bucket' or accumulator array for all incoming rho, or distance from origin. The longest possible

2015-09-16 18:55:30 -0600 received badge  Good Question (source)
2014-06-13 11:33:31 -0600 received badge  Popular Question (source)
2013-05-29 15:42:23 -0600 received badge  Nice Question (source)
2013-05-12 00:35:24 -0600 received badge  Student (source)
2013-05-11 21:32:13 -0600 asked a question Anyone want my notes on how to install OpenCV and a list of all errors i've gotten?

Stuff you have to do to get opencv to work

Clean Install of OpenCV

install microsoft visual c++ 2010 express (express is free)
install windows SDK (7.1)
(optional but recommended) install cuda
install CMake
install opencv
open the opencvconfig.cmake file in opencv/build
in cmake, source code: e:\opencv
build the binaries: anywhere - I did e:\opencv\build64

click configure.  (specify generator?  VS2010, or vs2010 x64?)
a bunch of options (highlighted red) should appear.  Make sure 'advanced' is checked (top right) and search through the entries.  Disable the 'enable solution folders' option
if including cuda, set enable_cuda and the cuda installation dir (recommended)
click configure twice, then generate once.  close cmake.

open the new .sln file in e:\opencv\build64 ( i don't know why it asks if you want to open in vs 10 or vs2010 - they seem to do the same thing)



at the top of vs2010 click the Win32, go to configuration manager, create new platform, find Win64 in the dropdown, click ok/close
hit f7 (build project) - may take hours

Errors I've gotten

Cannot open file kernel32.lib:
The file is located in:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib
include this in your project linker settings or set path?
http://blogs.msdn.com/b/saurabh_singh/archive/2009/01/30/getting-fatal-error-lnk1181-cannot-open-input-file-kernel32-lib.aspx


nvcc : fatal error : Visual Studio configuration file '(null)' could not be found :
http://stackoverflow.com/questions/2970493/cuda-linking-error-visual-express-2008-nvcc-fatal-due-to-null-configuratio


create new project -> win32 console application.  Time to set your settings for opencv.
tools->settings->enable expert settings (so you can see the property manager)
view->property manager -> add new project property sheet.  it will appear in the solution explorer list.  right click it->properties.  use these settings (so you don't have to redo all these settings if you have to start over - you can just load an existing property sheet):
in VC++ directories, include directories: 
E:\opencv\build\include
library directories
E:\opencv\build\x64\vc10\lib

Configuration Properties does not have an option i'm looking for:
In your solution explorer you need to have the correct file/entry selected. If compiling the binaries, look for ALL_BUILD in the list?

system error - the program can't start because opencv_corexxx is missing from your computer -
include path in env variables, restart computer

unresolved external symbol __imp_EncodePointer
need to include files from the SDK.  In properties->linker->general->include additional folders put:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64

1>opencv_core243d.lib(opencv_core243d.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
change the Win32 at the top of vs2010 to x64

ConfigurationGeneral not found
http://support.microsoft.com/kb/2519277?wa=wsignin1.0  bug when you upgrade to a SP1 - x64 compilers are removed.  



"encountered an unknown error and has to close"
"Microsoft VC Express has stopped working"
reinstall windows.  seriously.  Reinstalling Everything else does NOT work.  Only reinstalling windows works.
Event viewer (administration tools) should have more details, somewhere in ...
(more)
2012-12-29 11:14:31 -0600 answered a question How to get histogram of a rectangular area (ROI) of an image?

Your code is fine, but just do it in OpenCV 2.0.

2012-12-29 03:50:37 -0600 asked a question Why so many errors involve c:/slave/wininstallerMegaPack/... ??

I'm trying to compile CUDA - it successfully compiles/builds, but nothing will run. OpenCV keeps reporting this error:
C:/slave/wininstallermegapack/src/opencv/modules/gpu/src/precomp.hpp:135: error (-216) the library is compiled without GPU support.

But I never installed the MegaPack, and the file in question does not exist. So what's up with the errors? They don't make sense, and I'm desperate to figure out why my code isn't working.
Thanks for any help in advance.

2012-12-20 16:28:34 -0600 asked a question How does the filter2d algorithm *actually* work?

Are there any experts on the filter2D algorithm? I know how it's supposed to work but not how it actually works. I made my own filter2d() function to test things, and the results are substantially different from opencvs filter2D(). Here's my code:

Mat myfilter2d(Mat input, Mat filter){

    Mat dst = input.clone();
    cout << " filter data successfully found.  Rows:" << filter.rows << " cols:" << filter.cols << " channels:" << filter.channels() << "\n";
    cout << " input data successfully found.  Rows:" << input.rows << " cols:" << input.cols << " channels:" << input.channels() << "\n";

    for (int i = 0-(filter.rows/2);i<input.rows-(filter.rows/2);i++){
        for (int j = 0-(filter.cols/2);j<input.cols-(filter.cols/2);j++){  //adding k and l to i and j will make up the difference and allow us to process the whole image
            float filtertotal = 0;
            for (int k = 0; k < filter.rows;k++){
                for (int l = 0; l < filter.rows;l++){
                    if(i+k >= 0 && i+k < input.rows && j+l >= 0 && j+l < input.cols){  //don't try to process pixels off the endge of the map
                        float a = input.at<uchar>(i+k,j+l);
                        float b = filter.at<float>(k,l);
                        float product = a * b;
                        filtertotal += product;
                    }
                }
            }
            //filter all proccessed for this pixel, write it to dst
            st.at<uchar>(i+(filter.rows/2),j+(filter.cols/2)) = filtertotal;

        }
    }
    return dst;
}

Here is my execution:

      cvtColor(src,src_grey,CV_BGR2GRAY);
      Mat dst = myfilter2d(src_grey,filter);
      imshow("myfilter2d",dst);
      filter2D(src_grey,dst2,-1,filter);
      imshow("filter2d",dst2);

Here is my kernel:

float megapixelarray[basesize][basesize] = {
            {1,1,-1,1,1},
            {1,1,-1,1,1},
            {1,1,1,1,1},
            {1,1,-1,1,1},
            {1,1,-1,1,1}
            };

And here are the (substantially different) results:

Thoughts, anyone?

2012-12-20 16:08:08 -0600 commented answer Is this a bug or not about filter2D?

how does the filter2d algorithm work? The OpenCV documentation does not match my results.

2012-12-12 22:14:31 -0600 asked a question How does the Hessian transformation work?

I am trying to wrap my head around OpenCV's SURF algorithm. For the algorithm, points of interest are calculated by creating a Hessian Matrix around each pixel. But what does this mean? I understand the hessian matrix is just taking the 2nd derivatives - but why does it work? What is the significance?

I know this is more a math question than an OpenCV one, but this stems from an OpenCV project. Thanks for your answers, J