Thairobotics - Make the Real Things

การใช้งาน OpenCV 2.0 [CMake GUI]

อีเมล พิมพ์
User Rating: / 0
แย่ดีที่สุด 

บทความที่แล้วเป็นการใช้ CMake แบบ command line ที่วุ่นวายพอดู รอบนี้จะเป็นการใช้ CMake ผ่านตัว GUI (Graphic User Interface) ซึ่งจะช่วยให้ชีวิตง่ายขึ้นเยอะมาก

การคอมไพล์โดยใช้ CMake GUI จะเริ่มหลังจากหัวข้อที่ 3 (ติดตั้งและทดสอบ CMake) ในบทความที่แล้ว

 

  1. เปิด Visual Studio XXX คอนโซล
    setup06
  2. สร้างไดเรกทอรี release และเรียก cmake-gui จากคอนโซล
    consol01
  3. กด Configure
    cmake02
  4. จะได้หน้าต่างตามรูป
    cmake03
  5. ตั้งค่า
    cmake04
  6. กด Generate
    cmake05
  7. กลับไปคอนโซลแล้วพิมพ์ nmake แล้วก็รอๆๆๆ
    consol02

ติดตั้งและทดสอบ CMake

บทความที่เกี่ยวข้อง


แก้ไขล่าสุด ( วันพุธที่ 10 มีนาคม 2010 เวลา 10:14 น. )  

Comments  

 
0 #1 wrn 2010-03-18 17:23
Try again

หลังจากลอง compile (เสียเวลามากมาย กว่าจะรอมันเสร็ จ)
คือว่ามีปัญหาใน การโหลด video อะ , crash at cvCaptureFromFi le
แล้วก็ cvtest รันไม่ผ่านด้วยอ ะ crash ที่ hist-backproj (รัน ok แล้วตาย, ลอง debug แล้วไม่ได้ความอ ะไร)

ใครมีปัญหาบ้างอ
แล้วก็ตอน load` video ถ้าเปลี่ยนชื่อ opencv_ffmpeg20 0.dll หรือลบทิ้ง ก็จะโหลด วีดีโอได้ งง มากๆ แถมลอง compile แบบ debug แยก folder link คนละที่ แต่ถ้าลบไฟล์ใน folder release ก็จะได้รัน debug mode ได้อะ (ไม่มี link ไหนเกี่ยวข้องด้ วยเลยนะ) ไม่ได้ลิ้งค์ lib มัน แล้วก็ไม่ได้ยุ่ งอะำไรกับ release
Quote
 
 
0 #2 wrn 2010-03-18 17:24
hmm, I want to delete my comment first 2.

try if I type " < - - " without space

Left
Quote
 
 
0 #3 wrn 2010-03-18 21:11
After trying to do it many time, many way,
still the same result.
(on VS2005 / winXP)
I saw this issue on the net also, but not much info about it, so I think it is not happen to everyone.

Can anyone please try to run , cvtest.exe that the installer give us.
I got crash at warp-affine

and cvtest.exe that we compile ourselves
The compiled one by me is crash at hist-backproj

And also can easily try lkdemo.exe with some video file (tree.avi is available in the sample c folder)

If you success, may be I can get precompiled version of *.dll and *.lib

PS. I start to like cmake !! , it also can generate project file, I think it compile much quicker than nmake
Quote
 
 
0 #4 mahisorn 2010-03-19 14:38
เพิ่งมาเห็นคอมเ มนต์ เหมือน bot post เลยฮ่าๆๆ

จะลบสองอันแรกใช ่ปะ ? อัน 4 ด้วยปะ ?

เป็นเหมือนกันทั ้ง warp-affine และ hist-backproj (hang กลางทาง) แต่ตัวที่ compile ใน Linux ผ่านหมดไม่มีปัญ หาอะไร (ทางแก้น่าจะต้อ งลองใช้จริงแล้ว ดูว่ามันถูกหรือ ผิด)


ส่วนการ compile debug กะ release ใช้ แก้ flag ใน CMake ตรง debug กะ release แล้ว generate ใหม่ เพราะ lib มันจะมี d ต่อท้ายตัว debug

ตอนใช้งานกะ video ได้ปรกตินะไม่เจ อแบบที่แหวนบอก

ลองเข้าไปลบ path ที่โปรแกรมมัน set ตอน install ออก แล้วset เป็นของตำแหน่งท ี่ compile ใหม่ยัง (opecv2.0/xxx/bin)

อันนี้เสริม
ถ้าใช้ กับ file MOV จากกล้อง canon 500D ขนาด 1920*1080 มันจะพังใน opencv_ffmpeg20 0.dll ต้อง convert ไฟล์เป็น format อื่นก่อนถึงจะใช ้ได้ ส่วน 1280*720 ไม่มีปัญหาอะไร
Quote
 
 
0 #5 wrn 2010-03-19 15:26
haha,
I have no thai keyboard, so I type in somewhere else and copy paste.

The problem of 1,2,4 is, I didn't realize that we can use tag here, so I type "< - -" and I think it think that it is html tag for comment.

Now, I don't know, the video is work now, I recompile all the thing with debug/release.

PS. the lib in opencv2.0/bin is not the same name as the one we get from the compilation. (libcv200.dll / cv200.dll)

OK, then if I have time, we can report opencv, haha
Quote
 
 
0 #6 mahisorn 2010-03-25 14:38
Quoting wrn:
PS. I start to like cmake !! , it also can generate project file, I think it compile much quicker than nmake


It will use all CPU cores for the compilation when generate as project file. (2 cl.exe appear in core2duo CPU)
Quote
 
 
0 #7 wrn 2010-03-25 15:43
Quoting mahisorn:
Quoting wrn:
PS. I start to like cmake !! , it also can generate project file, I think it compile much quicker than nmake


It will use all CPU cores for the compilation when generate as project file. (2 cl.exe appear in core2duo CPU)


That's why, I have quad core (not mine)
so it is much much quicker.
Quote
 

Add comment


Security code
Refresh

จดหมายข่าว

กรุณากรอกอีเมล์เพื่อรับ/ยกเลิกข่าวอัพเดทต่างๆ

ขับเคลื่อนโดย Joomla!. Valid XHTML and CSS.