Ask Your Question

Song's profile - activity

2016-02-09 08:44:54 -0600 received badge  Famous Question (source)
2016-01-26 09:46:48 -0600 received badge  Student (source)
2015-09-25 09:16:24 -0600 received badge  Notable Question (source)
2015-07-18 03:05:37 -0600 received badge  Popular Question (source)
2014-07-18 02:52:52 -0600 asked a question Opencv Error:bad flag(parameter or structure field)(Unrecognized or unsupported array type)

Mat maskUnsolved = Mat(imgSize, CV_8UC1, cv::Scalar(0));

vector<cv::point> toSolveList;

toSolveList = getContour(maskUnsolved);//i called the function here

vector<cv::Point> BayesianMatting::getContour(Mat img)

{

 vector<cv::Point> ret;
 vector<vector<cv::Point> > contours;

 cv::findContours(img, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);//error is here
 int numContours = contours.size();
 for(int i=0;i<numContours;i++)
 {
    int count = contours[i].size();
    for(int j=0;j<count;j++)
    { 
        ret.push_back(contours[i][j]);
    }
 }
 return ret;

}

2014-07-16 21:26:26 -0600 commented answer like the picture below,how can i deal with the blue edges?

not very good ,because the environment is so complicated now,the background is not absolutely blue.

2014-07-16 04:04:42 -0600 commented answer like the picture below,how can i deal with the blue edges?

my higher mathematics is not very good,that's so difficult to me. -_-

2014-07-16 02:53:33 -0600 commented answer like the picture below,how can i deal with the blue edges?

i had seen the bayesian matting papers and robust matting ,but i could not find any code about that

2014-07-16 02:39:08 -0600 commented answer like the picture below,how can i deal with the blue edges?

my English is awful, :) my purpose is to achieve blue background video matting,do you have any idea?

2014-07-16 01:34:49 -0600 commented answer like the picture below,how can i deal with the blue edges?

what's that mean?

2014-07-15 21:41:52 -0600 commented answer like the picture below,how can i deal with the blue edges?

thank you for your time,that is awesome

2014-07-15 20:46:34 -0600 commented question like the picture below,how can i deal with the blue edges?

erode let the cat have no beard :D

2014-07-15 20:24:51 -0600 commented answer like the picture below,how can i deal with the blue edges?

No,cv::bitwise_and(src, dst, bk);//this is error ,size of input argument do not match

2014-07-15 05:08:48 -0600 asked a question like the picture below,how can i deal with the blue edges?

this is the source image,i matting the cat with photoshopcs5 and setting the background blue,cause i think this maybe easier to matted by opencv. image description this is the threshold image image description image description

Mat src,dst;
namedWindow("SRC");
namedWindow("DST");
src = imread("t1.jpg");
if (src.empty())
{
    cout<<"read data error!"<<endl;
    return -1;
}
imshow("SRC",src);

split(src,spl);//split
createTrackbar("thresh","DST",&threshold_value,255,on_Threshold);
on_Threshold(0,0);//CALLBACK

this is callback function

threshold(spl[0],dst,threshold_value,max_thresh,THRESH_BINARY_INV);
imshow("DST",dst);
bk = imread("Daydream.jpg");
if (bk.empty())
{
    cout<<"read data error!"<<endl;
    return ;
}
src.copyTo(bk,dst);//
imshow("dst2",bk);
2014-07-15 04:45:36 -0600 commented answer i want to split and show R B G pictures ,why does it not work?

yeah,pretty good! but blue.at<char>(i,j) = temp_blue;//cannot convert Scalar to char green.at<char>(i,j) = temp_green;//cannot convert Scalar to char red.at<char>(i,j) = temp_red;//cannot convert Scalar to char

2014-07-15 04:25:23 -0600 commented answer i want to split and show R B G pictures ,why does it not work?

thank you ,i know it.
cause my mother tongue is not English,I can not understand the point correctly.

2014-07-15 04:21:47 -0600 received badge  Scholar (source)
2014-07-15 01:41:03 -0600 commented answer i want to split and show R B G pictures ,why does it not work?

why the split pictures are not red,green,blue?Did i still need something else to deal with?

2014-07-14 23:06:09 -0600 received badge  Editor (source)
2014-07-14 23:05:24 -0600 asked a question i want to split and show R B G pictures ,why does it not work?
namedWindow("dst");
//i want t show R B G pictures
vector<Mat> spl;

src = imread("t1.jpg");
imshow("SRC",src);
split(src,spl);
imshow("spl1",spl[0]);//b
imshow("spl2",spl[1]);//g
imshow("spl3",spl[2]);//r