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

- สร้างไดเรกทอรี release และเรียก cmake-gui จากคอนโซล

- กด Configure

- จะได้หน้าต่างตามรูป

- ตั้งค่า

- กด Generate

- กลับไปคอนโซลแล้วพิมพ์ nmake แล้วก็รอๆๆๆ





Comments
หลังจากลอง 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
try if I type " < - - " without space
Left
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
จะลบสองอันแรกใช ่ปะ ? อัน 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 ไม่มีปัญหาอะไร
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
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.
RSS feed for comments to this post.