Ask Your Question

Msharsha's profile - activity

2017-10-16 12:37:15 -0600 received badge  Student (source)
2017-06-12 04:37:37 -0600 commented question strange result of graphcut in opencv

I tried finally and i got the masks updated and they contain black and white regions (i passed white masks) is it right a output?

2017-06-10 03:26:41 -0600 asked a question strange result of graphcut in opencv

I found that the result of it is strange ,the mask is all white or all black.Now I want to know how to use GraphCut to find seeam line between two overlapping two images.thanks! int main() {
Mat image0=imread("F:\1\1.jpg"); Mat image1=imread("F:\1\2.jpg"); image0.convertTo(image0,CV_32F,1.0/255.0); cv::imshow("image0",image0); image1.convertTo(image1,CV_32F,1.0/255.0); // our corners are just at (0,0) cv::Point corner1; corner1.x = 0; corner1.y = 0;

 cv::Point corner2;
 corner2.x = 0;
 corner2.y = 0;

 std::vector<cv::Point> corners;

 corners.push_back(corner1);
 corners.push_back(corner2);

 std::vector<cv::Mat> masks;
 //Mat imageMask0;
 //Mat imageMask1;
 Mat imageMask0(image0.size(),CV_8U);
 imageMask0(Rect(0,0,imageMask0.cols,imageMask0.rows)).setTo(255);
 Mat imageMask1(image1.size(),CV_8U);
 imageMask1(Rect(0,0,imageMask1.cols,imageMask1.rows)).setTo(255);
 masks.push_back(imageMask0);
 masks.push_back(imageMask1);

 std::vector<cv::Mat> sources;

 sources.push_back(image0);
 sources.push_back(image1);

 cv::detail::GraphCutSeamFinder *seam_finder = new cv::detail::GraphCutSeamFinder();
 seam_finder->find(sources, corners, masks);
 cv::imshow("mask",masks[1]);
 masks[0].convertTo(masks[0],CV_8UC3,255);
 cv::imwrite("F:\\1\\998.jpg",masks[0]);
 masks[1].convertTo(masks[1],CV_8UC3,255);
 cv::imwrite("F:\\1\\999.jpg",masks[1]);
 printf("%lu\n", masks.size());
 //for(int i = 0; i < masks.size(); i++)
 //{
 //     std::cout << "MASK = "<< std::endl << " "  << masks.at(i) << std::endl << std::endl;
 // }
 cv::waitKey();
  return 0;

}

2017-06-08 13:35:37 -0600 asked a question virtual void cv::detail::SeamFinder::find ( const std::vector< UMat > & src, const std::vector< Point > & corners, std::vector< UMat > & masks )

In the given documentation they given that to pass source image mask in place of third argument.So i passed a white image.I am not understanding what we should pass in place of third argument.Please help .

2017-06-08 08:33:44 -0600 asked a question What actually exposure compensator function will do?(stitching module)

what are the input and output arguments?
Are there any examples or references present for this ?

2017-06-07 00:11:42 -0600 received badge  Enthusiast
2017-06-06 09:26:11 -0600 received badge  Editor (source)
2017-06-06 09:25:10 -0600 asked a question bool operator() (const std::vector< ImageFeatures > &features, const std::vector< MatchesInfo > &pairwise_matches, std::vector< CameraParams > &cameras)

In the above function belonging to stitching module,what it ouputs i.e it is given that it estimates the rotations of images .how and in which form it will output?What is rotation matrix?I want what will be there in cameras?

2017-06-05 23:29:16 -0600 asked a question const std::vector< ImageFeatures > &features

Can we pass descriptors of type Mat in place of this argument ?

2017-06-04 07:58:04 -0600 commented answer void match (const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info)

thank you . I am implementing the function match() - stitching module

2017-06-04 00:05:21 -0600 asked a question void match (const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info)

Can anyone describe each parameter in this function ? What we have to pass for ImageFeatures? Can we use Mat and for MatchesInfo?Please describe what it ouputs(i.e in which format image or vector or anything).

2017-06-03 13:39:46 -0600 commented answer What about Multiband blending for grayscale images ?

feather blending?

2017-06-03 13:39:25 -0600 received badge  Supporter (source)
2017-06-03 13:06:45 -0600 asked a question What about Multiband blending for grayscale images ?

Generally so far i have seen in blenders.hpp it is given that for function feed image should of the type 8UC3 OR 16SC3 but how to use for grayscale images (1 channel)?

2017-06-01 05:51:42 -0600 commented answer Can a features matrix be an image with 3 channels? (knn search algorithm, flann module)

What actually does indices refer to in a color image ?

2017-06-01 05:46:58 -0600 received badge  Scholar (source)
2017-05-31 04:35:15 -0600 asked a question Can a features matrix be an image with 3 channels? (knn search algorithm, flann module)

What are the dimensions of features matrix ?