Ask Your Question

Salmaria's profile - activity

2013-07-24 03:00:22 -0600 commented answer Angle correction of each line in an article

@StevenPuttemans i dont want the code.. i just want an idea for line correction.and i told that this code is not working for all articles. i think you didin't get what i have asked. so if you can fix my problem. thanks to you

2013-07-23 22:00:35 -0600 commented answer Angle correction of each line in an article

ya this code is perfectly ok.. but i have told that this doesn't work for all articles.Did you tried this for 2,3 articles? I need the solution for correction after line detection. I got an idea from your answer. i was stucked at that point. so Thank you very much...

2013-07-22 23:07:04 -0600 received badge  Editor (source)
2013-07-21 22:50:54 -0600 asked a question Angle correction of each line in an article

image description

I want to correct each line in an article. if you have any idea please help me. i have used hough transformation to detect lines. but it doesn't work for all articles. so if you have any idea please help me...

#include "stdafx.h"
#include<opencv\cv.h>
#include<opencv\cxcore.h>
#include<opencv\highgui.h>
#include <math.h>
#include <stdlib.h>

int main(int argc, char** argv)
{
    IplImage* src = cvLoadImage("110.jpg");     
    IplImage* dst;
    IplImage* color_dst;
    IplImage* tempx = cvCreateImage(cvGetSize(src),IPL_DEPTH_16S,1);

    CvMemStorage* storage = cvCreateMemStorage(0);
    CvSeq* lines = 0;
    int i;

    if( !src )
        return -1;

    dst = cvCreateImage( cvGetSize(src), 8, 1 );
    color_dst = cvCreateImage( cvGetSize(src), 8, 3 );  
    cvCanny( src, dst, 50, 200, 3 );

    cvCvtColor( dst, color_dst, CV_GRAY2BGR );
    CvSize size = cvGetSize(dst);

    lines = cvHoughLines2( dst, storage, CV_HOUGH_PROBABILISTIC, 1, CV_PI/45, 50, 50, 10 );

    for( i = 0; i < lines->total; i++ )
    {
        CvPoint* line = (CvPoint*)cvGetSeqElem(lines,i);
        cvLine( color_dst, line[0], line[1], /*CV_RGB(255,0,0)*/cvScalar(255, 0 ,0), 4, CV_AA, 0 );
    }

    cvNamedWindow( "Source", 1 );
    cvShowImage( "Source", dst );
    cvNamedWindow( "Hough", 1 );
    cvShowImage( "Hough", color_dst );
    cvWaitKey(0);
    return 0;
}
2013-07-12 09:10:40 -0600 asked a question how to change pixel position

Hi, I need to change the position of the selected pixels. that is in an image i have selected some pixels by changing the color of perticular area. so now i need to get those pixels to another position. Can you please give me an idea.