Ask Your Question

wuling's profile - activity

2020-12-14 03:20:39 -0600 received badge  Famous Question (source)
2020-11-15 01:30:03 -0600 marked best answer How to use InRange at Different Color Space and Range.

Hi all, how to use InRange at different color space and Range. for example:in RGB space, 0<=R,G,B<=255, so,it's very easy to use:

inRange(const MatND& src, const Scalar& lowerb, const Scalar& upperb, MatND& dst)

But if i want the range out of the lowerb & upperb, for example: I want R color Range: 0<=R<=20, 100<=R<=255. like Aforge Color Filtering as picture. Also, in the other color space how to use InRange where the parameters out of the range. Thanks:)

image description

2020-10-24 06:39:09 -0600 received badge  Good Answer (source)
2020-10-24 06:39:09 -0600 received badge  Nice Answer (source)
2020-06-25 13:56:20 -0600 received badge  Taxonomist
2020-04-13 17:08:49 -0600 received badge  Popular Question (source)
2020-02-25 01:04:13 -0600 received badge  Popular Question (source)
2020-02-11 13:34:11 -0600 received badge  Popular Question (source)
2020-02-11 13:34:11 -0600 received badge  Notable Question (source)
2019-09-19 03:21:36 -0600 commented question discrete_fourier_transform sample error in opencv4.1.1

But I still find another question. The cols of the variable planes[0] is 75. Why?

2019-09-19 02:14:09 -0600 answered a question discrete_fourier_transform sample error in opencv4.1.1

Sorry, I find out another problem: In this image, the cols of padded[0] is 75. why? it should be 25 .Isn't?

2019-09-19 00:23:56 -0600 commented question discrete_fourier_transform sample error in opencv4.1.1

Hi, LBerger, I think i find out the problem. This code : Mat planes[] = { Mat_<float>(padded), Mat::zeros(padded.

2019-09-18 04:19:34 -0600 asked a question discrete_fourier_transform sample error in opencv4.1.1

discrete_fourier_transform sample error in opencv4.1.1 Hi all: I find a error in sample code, I am not sure it's an err

2019-08-19 14:05:31 -0600 received badge  Notable Question (source)
2019-06-10 19:51:03 -0600 edited answer cv::mat in mfc

try list: int ShowMat( cv::Mat img, HWND hWndDisplay ) { if (img.channels()<3 ) { re

2019-06-10 19:35:03 -0600 edited answer cv::mat in mfc

int ShowMat( cv::Mat img, HWND hWndDisplay ) { if (img.channels()<3 ) { return -1; } RECT rect;

2019-06-04 08:38:07 -0600 received badge  Notable Question (source)
2019-05-22 19:34:45 -0600 commented question robust external contour detection?

yes, try to use threshold and get blob.Finally you use boundingRect to find bounding.

2019-05-21 19:19:18 -0600 commented question robust external contour detection?

try adaptivethreshold replace Canny.

2019-01-23 08:36:59 -0600 edited question Is bug or not in opencv3.4.4(findcontours)?

Is bug or not in opencv3.4.4(findcontours)? Hi all. Long time no see, I try to rewrite sample code as below public: Sy

2019-01-23 08:27:28 -0600 asked a question Is bug or not in opencv3.4.4(findcontours)?

Is bug or not in opencv3.4.4(findcontours)? Hi all. Long time no see, I try to rewrite sample code as below public: Sy

2019-01-15 00:47:22 -0600 received badge  Notable Question (source)
2018-12-07 06:32:46 -0600 received badge  Famous Question (source)
2018-10-02 08:27:39 -0600 commented question cv::String in example opencv_version Opencv 3.0

No,just do your best

2018-09-27 07:53:14 -0600 commented answer Having trouble with using Mat image in pictureBox of Visual C++ CLR project

Sorry I delete some comment!

2018-09-27 07:52:51 -0600 edited answer Having trouble with using Mat image in pictureBox of Visual C++ CLR project

Hi, here is the example code, but web is japan language http://imagingsolution.blog107.fc2.com/blog-entry-91.html if you

2018-08-08 05:33:23 -0600 received badge  Popular Question (source)
2018-03-05 07:06:01 -0600 received badge  Notable Question (source)
2017-10-07 09:23:53 -0600 received badge  Popular Question (source)
2017-08-07 16:02:27 -0600 received badge  Popular Question (source)
2017-07-10 16:41:39 -0600 marked best answer How to access pixels along a line or curve using opencv?

Hi all, is any method to access pixels along a line or curve in opencv???

2017-07-05 03:05:53 -0600 received badge  Popular Question (source)
2017-03-03 14:44:33 -0600 received badge  Popular Question (source)
2017-02-27 16:34:16 -0600 received badge  Notable Question (source)
2017-02-08 20:09:44 -0600 received badge  Famous Question (source)
2016-12-12 07:48:11 -0600 commented question CV_IPP_RUN no define when build opencv3.1.0

I found you should download from github. There is a bug in OpenCV V3.1.0. if you download from sourceforge!

2016-05-21 15:50:39 -0600 marked best answer How to create irregular ROI??

Hi all:

How to use opencv to create irregular ROI? Like rotate rectangle, cycle , H,or T sharp ROI????

2016-04-15 11:33:58 -0600 received badge  Popular Question (source)
2016-03-13 00:22:17 -0600 asked a question CV_IPP_RUN no define when build opencv3.1.0

Hi all, I use cmake to config my system before build opencv3.1.0 source core. But when i open source code in vs2015. I find that "identifier CV_IPP_RUN not define". How to setup or config the environment?

found IPP (ICV version): 9.0.1 [9.0.1]
at: H:/opencv-3.1.0/opencv/sources/3rdparty/ippicv/unpack/ippicv_win
CUDA detected: 7.5
CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_30,code=compute_30
To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.10", minimum required is "2.7") 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named numpy.distutils

Found PythonInterp: C:/Python34/python.exe (found suitable version "3.4.3", minimum required is "3.4") 
Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.4.3")
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'numpy'

Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file

General configuration for OpenCV 3.1.0 =====================================
  Version control:               unknown

  Platform:
    Host:                        Windows 6.2 AMD64
    CMake:                       3.3.0-rc2
    CMake generator:             Visual Studio 14 2015 Win64
    CMake build tool:            C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
    MSVC:                        1900

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe  (ver 19.0.23506.0)
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /wd4251 /wd4324 /wd4275 /wd4589 /MP8  /MD /O2 /Ob2 /D NDEBUG  /Zi
    C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /wd4251 /wd4324 /wd4275 /wd4589 /MP8  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
    C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
    C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi    /MP8  /MD /O2 /Ob2 /D NDEBUG  /Zi
    C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi    /MP8  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
    Linker flags (Release):      /machine:x64  /INCREMENTAL:NO  /debug
    Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL 
    Precompiled headers:         YES
    Extra dependencies:          comctl32 gdi32 ole32 setupapi ws2_32 vfw32 C:/Program Files/Allied Vision Technologies/GigESDK/lib-pc/x64/PvAPI.lib cudart nppc nppi npps cufft -LC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v7.5/lib/x64
    3rdparty dependencies:       zlib libjpeg libwebp libpng libtiff libjasper IlmImf

  OpenCV modules:
    To be built:                 cudev core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec highgui objdetect ts features2d calib3d cudafeatures2d cudalegacy ...
(more)
2016-03-03 10:14:56 -0600 commented question BaseRowFilter and BaseColumnFilter in opencv 3.x

I am sorry that it is the same question:)

2016-02-23 21:01:26 -0600 received badge  Notable Question (source)
2016-01-11 03:08:10 -0600 marked best answer The contours in drawcontours is closed or not?

Hi all, this is my test picture:

image description

As i know, if want to calculate the area or others , the contours should be closed. But I test findcontours and drawcontours , i cann't verify. The following code is true or not. Thanks.

  Mat temp,blob;
    blob=Mat::zeros(imgIn_height,imgIn_width,CV_8UC1);
    temp=Mat::zeros(imgIn_height,imgIn_width,CV_8UC1);
    cv::findContours(hole.clone(),contours,hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE);
    for(int idx=0; idx<contours.size(); ++idx)    
    {       
            drawContours(blob, contours, idx, Scalar::all(255), CV_FILLED, 8, hierarchy);       
            imwrite("c:\\result.bmp",blob);

            for(int i=0;i<contours[idx].size();i++)
            {
                cv::Point p=contours[idx][i];
                temp.at<uchar>(p.y,p.x)=255;
            }

    A=cv::contourArea(contours[idx]);
    }
    imwrite("c:\\temp.bmp",temp);

Finally I get:

image description---->result.bmp

image description--->Contours(temp.bmp) is not closed.

2015-12-31 00:49:05 -0600 received badge  Famous Question (source)
2015-12-26 13:49:05 -0600 marked best answer How to faster sort matrix?

I want to sort all element of mat but my kernel size(kernel_size=61) is very large. Now i use

///* For each window row */
for ( iwr = wr_begin; iwr < wr_end; iwr++ )
 {
   /* For each window column */
    memcpy(p+k*win_size,src2.data+(ic-c_begin)+(ir-r_begin+iwr-wr_begin)*num_cols,sizeof(win_size));
   k+=1;
}

 //cv::Rect roi(ic-c_begin,ir-r_begin,win_size,win_size);
//Mat roi_image=src2(roi);
//roi_image
std::sort(p,p+win_count);
median_value=p[pos] ;

Is any faster method?? pls tell me, thanks:)

2015-11-07 06:40:50 -0600 received badge  Popular Question (source)