Tuesday, 18 June 2013

Row smearing and column smearing in image

Row smearing:-Row smearing convert an input image  into a image which is smeared row wise .Here is the code ,input image and output image for the row smearing:-

for(i=0;i<height;i++)
        for(j=0;j<width;j++)
 {
if(data1[i*step+j]==0)
data2[i*step+j]=0;
else
{
for(k=0;data1[i*step+(j+k)]==255;k++);
if(k<h)
{
for(l=0;l<k;l++)
data2[i*step+(j+l)]=0;
}
j=j+(k-1);
}
}


                                                                   Input Image



Output Image



Column smearing:-Column smearing convert an input image into a image smeared column wise .Here is the code ,input image and output image for the column smearing:-


for(j=0;j<width;j++)
{
for(i=0;i<height;i++)
{
if(data1[i*step+j]==0)
{
data3[i*step+j]=0;
}
else
{
if(data1[i*step+j]==255)
{
k=0;
while(data1[(i+k)*step+j]==255)
{
k++;
if((i+k)>=height)
{
break;
}
}
if(k<v)
{
for(l=0;l<k;l++)
{
data3[((i+l)*step)+j]=0;
}
}
i=i+(k-1);
}
else
{
printf("%d",data1[(i*step)+j]);
}
}

}
}

                                                                   
                                                                    Input Image




Output Image





Monday, 10 June 2013

SURF, FREAK, BRISK, ORB classes in opencv

SURF:-SURF class is used for or extracting Speeded Up Robust Features from an image.The class SURF implements Speeded Up Robust Features descriptor Bay06 . There is fast multi-scale Hessian keypoint detector that can be used to find the keypoints (which is the default option), but the descriptors can be also computed for the user-specified keypoints. The function can be used for object tracking and localization,
image stitching etc.

FREAK:-The Class implementing the FREAK (Fast Retina Keypoint) keypoint descriptor, described in [AOV12]. The algorithm propose a novel keypoint descriptor inspired by the human visual system and more precisely the retina, coined Fast Retina Key- point (FREAK). A cascade of binary strings is computed by efficiently comparing image intensities over a retinal sampling pattern. FREAKs are in general faster to compute with lower memory load and also more robust than SIFT, SURF or BRISK. They are competitive alternatives to existing keypoints in particular for embedded applications.

BRISK:-Class implementing the BRISK keypoint detector and descriptor extractor, described in [LCS11].

ORB :-Class implementing the ORB (oriented BRIEF) keypoint detector and descriptor extractor, described in [RRKB11]. The algorithm uses FAST in pyramids to detect stable keypoints, selects the strongest features using FAST or Harris response, finds their orientation using first-order moments and computes the descriptors using BRIEF (where the coordinates of random point pairs (or k-tuples) are rotated according to the measured orientation).