Ask Your Question

ussdrk's profile - activity

2014-02-24 01:55:28 -0600 asked a question Edge Histogram Descriptor EHD opencv Code

Please post opencv code for Edge Histogram Descriptor if anybody having it

2013-10-26 07:22:59 -0600 asked a question Moving Object Detection

here is the opencv code showing moving objects but not able to make rectangle around objects please help me get out of this problem

2013-09-10 09:59:51 -0600 commented answer Grayscale to Lbp image

I tried this too But when i am doing feature point extraction on Actual Output image Results are different than when i do on The lbp image which is given as sample I mailed u all images and code Please try to solve.

2013-09-10 09:24:29 -0600 received badge  Editor (source)
2013-09-10 09:11:31 -0600 commented question Grayscale to Lbp image

@berak I have sample input and output.But after executing i am getting different output. will u please give ur Email Id so that i can mail u images and code.

2013-09-10 09:03:15 -0600 commented question Grayscale to Lbp image

Sorry this is my first time so got confused with tags.

2013-09-10 06:17:10 -0600 asked a question Grayscale to Lbp image

Actual output Desired output Hi friends i am trying to implement paper on Rapid texture Based Moving Object Detection So in this the first step is to convert grayscale image to lbp image so i have written the following code but it is not producing the desired output So Please if anybody having proper code provide it or state correction in my code.

int main() {

Mat img = cv::imread("im1.jpg");

if (img.empty())
{
   std::cout << "Cannot open image!" << std::endl;
    return -1;
}
Mat greyMat;

cvtColor(img, greyMat, CV_BGR2GRAY);
Mat lbp=greyMat.clone();
long row=greyMat.rows;
long col=greyMat.cols;
for(int i=1;i<greyMat.rows;i++)
{
 for(int j=1;j<greyMat.cols;j++)
 {
    int cp=(int)greyMat.at<uchar>(i,j);
    int pp=0;
    int po=7;
    if(cp<=(int)greyMat.at<uchar>(i,j+1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j+1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j-1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i,j-1))
    pp+=pow(2,po);
    po--;


    if(cp<=(int)greyMat.at<uchar>(i-1,j-1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i-1,j))
    pp+=pow(2,po);
    po--;

    if(cp<=(int)greyMat.at<uchar>(i-1,j+1))
    pp+=1*pow(2,po);
    po--;


    lbp.at<uchar>(i,j)=pp;

 }
}

return 0;

}

2013-09-10 06:15:45 -0600 asked a question GrayScale to LBP image

Hi friends i am trying to implement paper on Rapid texture Based Moving Object Detection So in this the first step is to convert grayscale image to lbp image so i have written the following code but it is not producing the desired output So Please if anybody having proper code provide it or state correction in my code.

int main() {

Mat img = cv::imread("im1.jpg");

if (img.empty())
{
   std::cout << "Cannot open image!" << std::endl;
    return -1;
}
Mat greyMat;

cvtColor(img, greyMat, CV_BGR2GRAY);
Mat lbp=greyMat.clone();
long row=greyMat.rows;
long col=greyMat.cols;
for(int i=1;i<greyMat.rows;i++)
{
 for(int j=1;j<greyMat.cols;j++)
 {
    int cp=(int)greyMat.at<uchar>(i,j);
    int pp=0;
    int po=7;
    if(cp<=(int)greyMat.at<uchar>(i,j+1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j+1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j-1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i,j-1))
    pp+=pow(2,po);
    po--;


    if(cp<=(int)greyMat.at<uchar>(i-1,j-1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i-1,j))
    pp+=pow(2,po);
    po--;

    if(cp<=(int)greyMat.at<uchar>(i-1,j+1))
    pp+=1*pow(2,po);
    po--;


    lbp.at<uchar>(i,j)=pp;

 }
}

return 0;

}

2013-09-10 06:13:12 -0600 asked a question Convert Grayscale to Lbp image

Hi friends i am trying to implement paper on Rapid texture Based Moving Object Detection So in this the first step is to convert grayscale image to lbp image so i have written the following code but it is not producing the desired output So Please if anybody having proper code provide it or state correction in my code.

int main() {

Mat img = cv::imread("im1.jpg");

if (img.empty())
{
   std::cout << "Cannot open image!" << std::endl;
    return -1;
}
Mat greyMat;

cvtColor(img, greyMat, CV_BGR2GRAY);
Mat lbp=greyMat.clone();
long row=greyMat.rows;
long col=greyMat.cols;
for(int i=1;i<greyMat.rows;i++)
{
 for(int j=1;j<greyMat.cols;j++)
 {
    int cp=(int)greyMat.at<uchar>(i,j);
    int pp=0;
    int po=7;
    if(cp<=(int)greyMat.at<uchar>(i,j+1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j+1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i+1,j-1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i,j-1))
    pp+=pow(2,po);
    po--;


    if(cp<=(int)greyMat.at<uchar>(i-1,j-1))
    pp+=pow(2,po);
    po--;
    if(cp<=(int)greyMat.at<uchar>(i-1,j))
    pp+=pow(2,po);
    po--;

    if(cp<=(int)greyMat.at<uchar>(i-1,j+1))
    pp+=1*pow(2,po);
    po--;


    lbp.at<uchar>(i,j)=pp;

 }
}

return 0;

}