Ask Your Question

adnandani's profile - activity

2016-11-12 03:58:04 -0500 commented question How to find a segment location after applying PyrMeanShiftFiltering.

Actually, i am working on a project that is totally based on visual c++ 6.0 and opencv 1.0. I cannot change version because project is very complex and i would need to make complete new project if i will change version. I have googled my query but all help is related to new versions. Please help me is there any way i can achieve my goal while using these versions ?

2016-11-12 03:39:51 -0500 received badge  Editor (source)
2016-11-12 03:38:18 -0500 asked a question How to find a segment location after applying PyrMeanShiftFiltering.

I am using following code to differentiate between a sky blue region (required region) in my image C:\fakepath\input image.jpg

and the background. I have applied PyrMeanShiftFiltering function to do segmentation of the image. After applying code the result


image have successfully segmented sky blue section but now i want to know the location of this sky blue region (mid point). Can any one help me how i can know the coordinates of this blue region in my image after doing this image segmentation.

#include "cv.h"
#include "highgui.h"
#include "math.h"
#include <iostream.h>

int main(int argc, char** argv)
IplImage* output_image;

    IplImage* image = cvLoadImage("31.jpg",CV_LOAD_IMAGE_COLOR);
  CvMemStorage* storage = cvCreateMemStorage(0);
        cvNamedWindow( "origional image", 1 );
        cvShowImage( "origional image", image);

    IplImage *filtered = cvCreateImage(cvGetSize(image),image->depth,image->nChannels);


  int level = 3;
  int spatial_radius = 40;
  int color_radius  = 40;

  filtered->width &= -(1<<level);
  filtered->height &= -(1<<level);

  cvPyrMeanShiftFiltering(filtered, filtered,spatial_radius,color_radius,level);
  cvNamedWindow( "fourth", 1 );
        cvShowImage( "fourth", filtered);

   return 0;
2016-10-11 20:56:07 -0500 asked a question Can Microsoft visual c++ 6.0 work with all 0pencv versions or not ?

I have tried different versions of opencv with Microsoft visual c++ 6.0. Some simple projects can work ok with Opencv version like 2.x.x but some projects don't. I am installing Opencv by Using the Pre-built Libraries. If i use Visual studio 2008 then opencv works ok for all projects. However i must have to use Microsoft visual c++ 6.0 for my project. Is there any solution or installation method with which i can use Microsoft visual c++ 6.0 to work properly with 2.x.x or higher versions of opencv ? Thanks please help me.

2016-10-05 12:00:01 -0500 asked a question How to find the center of a template matching rectangle

I have tried the following template matching OpenCV code. It works well for my application.

I just want to know how I can find the center position or location of template matching rectangle . Can anyone please help me. Thank you