Ask Your Question

tofi9's profile - activity

2016-01-23 16:31:05 -0600 received badge  Student (source)
2013-09-19 10:34:53 -0600 received badge  Editor (source)
2013-09-19 10:32:07 -0600 asked a question Detect slightly distorted line

Given the following (canny'd) image, I'd like to grab the start/end endpoints of the full upper horizontal line.

I've tried opencv's HoughLineP function, but get segments rather than a full line. I realise that this is due to the camera calibration distortion.

  • Is there some other technique that is more forgiving when it comes to curvy distortions?
  • Alternatively, what would be a good way to join points that close to each other (with somehow similar angle)

Original

Orignal-canny

Code

Mat scene = imread("houghLines.png", 0);

vector<Vec4i> lines;
HoughLinesP(scene, lines, 1, CV_PI/180, 40, 100, 20 );

cvtColor(scene, scene, COLOR_GRAY2BGR); scene *= 0.5; // convert to colour

auto colours = generateColours((int)lines.size());
for(int i = 0; i < lines.size(); i++) {
    auto l = lines[i];
    line(scene, Point(l[0], l[1]), Point(l[2], l[3]), colours[i], 1, CV_AA);
}

imshow("scene", scene);
waitKey();

Result

Result

2013-01-08 05:31:50 -0600 asked a question cv::split & cv::merge linker error

I'm using opencv in an Android project. When I try to use the C++ functions cv::split or cv::merge, I get the following linker error:

undefined reference to 'cv::merge(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, cv::_OutputArray const&)'  XXXXX       line 144, external location: /Applications/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/objs/XXXXX/JniLayer.o: in function XXXXX_JniLayer_processImage:jni/JniLayer.cpp   C/C++ Problem

Am I missing something?

Android.mk settings:

OPENCV_INSTALL_MODULES:=off
OPENCV_CAMERA_MODULES:=off
OPENCV_LIB_TYPE:=STATIC

include /opt/android/OpenCV-2.4.3.1-android-sdk/sdk/native/jni/OpenCV.mk