Beispiel #1
0
int imProcessHoughLines(const imImage* src_image, imImage *dst_image)
{
  int counter = imCounterBegin("Hough Line Transform");
  imCounterTotal(counter, src_image->height, "Processing...");

  int ret = houghLine(src_image, dst_image, counter);

  imCounterEnd(counter);

  return ret;
}
Beispiel #2
0
int main(int argc, char* argv[]) {

    int ch;
    int iflag = 0, 
        lflag = 0;
    int limit;
    char* filename;
    char * endptr;

    while ( (ch = getopt(argc, argv, "i:l:")) != -1) {
        switch (ch) {
        case 'i':
            iflag = 1;
            filename = optarg;
            break;
        case 'l':
            lflag = 1;
            limit = atoi(optarg);
            break;
        default:
            usage();
            return 0;
        }
    }

    // required arguments
    if(!lflag || !iflag){
        usage();
        return 0;
    }

    cv::Mat original = cv::imread(filename);
    std::cout << "Original image: " << filename << std::endl;

    houghLine(original, limit);

    cv::waitKey();
    return 0;
}