0

I am trying to run the Delaunay example code https://github.com/Itseez/opencv/blob/master/samples/cpp/delaunay2.cpp. but I face this error when building: "identifier "LINE_AA" is undefined", and "identifier "LINE_8" is undefined". where do you think the problem is?

I built the project using cmake and this is inside cmakelist.txt:

cmake_minimum_required(VERSION 2.8)
project( delaunay2)
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
add_executable( delaunay2 delaunay2.cpp )
target_link_libraries( delaunay2 ${OpenCV_LIBS} )

also I am running MSVC 2012 under winodws 7x64.

Here is a picture of debug assertion error which still pops up even after I Ignore but then it draws some lines for me!

enter image description here

CV_passionate
  • 115
  • 1
  • 4
  • 18

2 Answers2

0

since you are using opencv2.4.x, please try the 2.4 example at: https://github.com/Itseez/opencv/blob/2.4/samples/cpp/delaunay2.cpp

2.4.x and 3.0 differ quite significantly.

berak
  • 39,159
  • 9
  • 91
  • 89
  • I tired that. It is still giving me Debug Assertion Failed error. but if I click on Ignore, it will start drawing the lines and triangles! I have attached a picture. Can you please tell me why this is happening and how to fix it? – CV_passionate Jan 09 '15 at 16:28
  • I am trying this on a windows x64 system. but the code is set to auto, debug, win32 in MSVC 2012 environment. Do you think thats where the problem coming from? – CV_passionate Jan 09 '15 at 16:56
0

Finally got it working. This is the correct link for delaunay triangulation using OpenCV 2.4.9:

https://github.com/Itseez/opencv_attic/blob/master/opencv/samples/c/delaunay.c

CV_passionate
  • 115
  • 1
  • 4
  • 18