Page 46 of 60
Re: PureBasic Interface to OpenCV
Posted: Tue Oct 04, 2016 6:17 am
by JHPJHP
Hi wilbert,
I like the varying dot sizes better
I agree, it brings a lot more detail to the effect.
------------------------------------------------------------
Updated:
- deleted 2 examples
--
le_delaunay_1.pb, le_delaunay_2.pb
- renamed 1 example
--
cv_morph_faces.pb to
cv_morph_faces_show.pb
- added 1 example
--
cv_morph_faces_build.pb: manual construction of Delaunay triangulation
When the morph example was first added to the interface, I stated that with very little effort the Delaunay examples could be modified to generate data for additional image morphing; the example
cv_morph_faces_build.pb does just that.
The current morph effect (viewed from the example
cv_morph_faces_show.pb) was created in about 10 minutes, but a caveat to generating a successful transition is the strict rules that need to be followed;
if requested I will post instructions.
NB*: The following website is a good source for images:
http://www.vipcutouts.com/.
Re: PureBasic Interface to OpenCV
Posted: Tue Oct 04, 2016 6:35 am
by Keya
i have to keep peeking into this thread to see the extraordinary screenshots, there's some
amaaaazing algorithms you've made accessible to PB'ers via OpenCV, JHP²! keep up the brilliant work

Re: PureBasic Interface to OpenCV
Posted: Wed Oct 05, 2016 4:06 am
by JHPJHP
Hi Keya,
Thank you for your kind words.
----------------------------------------------------
NOTE: In the previous update I did a global find and replace that caused some examples to crash when moving the Trackbar; this has been fixed. Update has been reposted.
----------------------------------------------------
Updated:
- updated 1 example:
cv_morph_faces_build.pb
- added 6 Haarcascade classifiers
--
left eye, right eye, left ear, right ear, nose, and mouth
Press the [ X KEY ] once to remove all points, press it a second time to execute the beginnings of a
Facial Feature Points Detection algorithm.
- this is a work in progress:
left eye, right eye, nose, and mouth are marked by colored rectangles
NB*: At some point this should assist with building a facial feature point map, but currently it's only a proof of concept.

Re: PureBasic Interface to OpenCV
Posted: Wed Oct 05, 2016 4:27 am
by Keya
how long does it take to generate that?
Re: PureBasic Interface to OpenCV
Posted: Wed Oct 05, 2016 4:38 am
by JHPJHP
Hi Keya,
Keya wrote:how long does it take to generate that?
Are you referring to building a facial feature point map manually?
The morph effect was created in about 10 minutes, but a caveat to generating a successful transition using the example
cv_morph_faces_build.pb are the strict rules that need to be followed.
Re: PureBasic Interface to OpenCV
Posted: Wed Oct 05, 2016 4:49 pm
by wilbert
JHPJHP wrote:The morph effect was created in about 10 minutes
That's fast

Re: PureBasic Interface to OpenCV
Posted: Wed Oct 05, 2016 6:07 pm
by Keya
I was wondering because i recall seeing examples of "face detection" (i guess not facial features but not sure), but it's working on video and appears to be detecting in realtime which i was stunned at! (or perhaps it's post-processing!?) ... so I searched for a random example at google images -- but interestingly this example i found
is using OpenCV!

src
https://pythonspot.com/en/face-detection-in-video/
Re: PureBasic Interface to OpenCV
Posted: Wed Oct 05, 2016 6:45 pm
by JHPJHP
Hi wilbert,
It'll be faster once I finish the facial feature detection algorithm; plotting points manually is a pain (who has 10 minutes)
---------------------------------------------------------------------------
Hi Keya,
I've duplicated that exact example (
cv_cam_haardetect_face.pb), with a few added features, including various mask overlays.
Webcam face-detection examples...
-
cv_cam_camshift.pb: using the Camshift algorithm, color information is used to track an object along an image sequence
-
cv_cam_haardetect_face.pb: tries to detect a frontal-face using HaarCascades
-
cv_cam_matchtemplate.pb: object recognition using the template matching algorithm
Face learning examples... (first read:
references\haarcascade.txt)
-
cv_cam_haardetect_train_1.pb: Haar-Training in stages for single face recognition (new version)
-
cv_cam_haardetect_train_2.pb: Haar-Training in stages for single face recognition (old version)
And these...
-
cv_haardetect_face.pb: tries to detect frontal-faces of different sizes using HaarCascades
-
cv_matchtemplate.pb: compares a template against overlapped image regions; matching one face against many faces
-
cv_norm.pb: using a default image, the absolute difference is calculated against a directory of images, returning the closest match
NB*: There are quite a few other examples that would enhance face detection and/or recognition through various filters and algorithms.
Re: PureBasic Interface to OpenCV
Posted: Wed Oct 05, 2016 7:25 pm
by Keya
haha wow you added that so fast!!! brilliant

Re: PureBasic Interface to OpenCV
Posted: Thu Oct 06, 2016 3:31 am
by JHPJHP
Hi Keya,
haha wow you added that so fast!!! brilliant
I should have mention that the face detection examples were created over a year ago.
I thought when you asked how long it took to generate, you were referring to the mapping of facial features, which previously was a manual process. All the face detection examples are in real time, a credit to the speed of OpenCV.
------------------------------------------------------------------
Hi wilbert,
I've finished the changes to the morphing examples. The time it takes to create the facial feature maps has been reduced from 10 minutes to ten seconds
An added bonus to automatically detecting facial features is the accuracy and improved transitions; you really have to see it for yourself.
------------------------------------------------------------------
Updated:
- updated 1 example:
cv_morph_faces_build.pb
-- switched from a strictly manual facial feature detection method to an automatic one, with the option to manually add additional points
Run the example
cv_morph_faces_show.pb to view a pre-mapped morphing effect.

Re: PureBasic Interface to OpenCV
Posted: Thu Oct 06, 2016 6:25 am
by wilbert
Looks good

Re: PureBasic Interface to OpenCV
Posted: Thu Oct 06, 2016 7:59 am
by idle
scary
Re: PureBasic Interface to OpenCV
Posted: Tue Oct 25, 2016 9:41 pm
by JHPJHP
Thanks wilbert, idle,
idle wrote:scary
True, but less scary then the previous transition between Trump, Clinton and Cruz
---------------------------------------------------
Updated (Windows and OSX interfaces):
- renamed 1 example
--
cv_mov_writeframe_FFMPEG.pb to
cv_RTSP_writeframe_FFMPEG.pb
- added 1 example
--
cv_RTSP_writeframe.pb: using RTSP (Real Time Streaming Protocol) an online video is saved to a local folder
12 video stream URL's have been included in the example, randomly loaded:
-
RTSP Source URL Syntax
Code: Select all
Dim arrRTSP.s(11)
arrRTSP(0) = "http://wse.planeta-online.tv:1935/live/channel_3/master.m3u8"
arrRTSP(1) = "http://95.140.197.69:8000/channel-18?m3u8"
arrRTSP(2) = "rtsp://mm2.pcslab.com/mm/PrinceofPersia.mp4"
arrRTSP(3) = "http://iphone-streaming.ustream.tv/uhls/18525677/streams/live/iphone/playlist.m3u8?NOVOROSSIYA.720p.HD"
arrRTSP(4) = "http://95.140.197.69:8000/channel-54?m3u8"
arrRTSP(5) = "rtsp://mm2.pcslab.com:554/mm/wh2000.3gp"
arrRTSP(6) = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"
arrRTSP(7) = "http://31.204.128.104:8081/live/sptv/playlist.m3u8"
arrRTSP(8) = "rtsp://mm2.pcslab.com/mm/7m2000.mp4"
arrRTSP(9) = "http://lcdn.une.net.co:80/v1/AUTH_HLSLIVE/TCAF/tu1_1.m3u8"
arrRTSP(10) = "http://hls.tombalalive.com/ios/smil:live.smil/playlist.m3u8"
arrRTSP(11) = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
Repeat
nCreate + 1
*capture.CvCapture = cvCreateFileCapture(arrRTSP(Random(11)) + "?Transport=multicast")
Until nCreate = 5 Or *capture
Re: PureBasic Interface to OpenCV
Posted: Tue Nov 29, 2016 7:15 pm
by Mesa
There are a lot of tutos to make panorama picture (360°) but i can't find any one to make a panorama viewer with picture from google streeview. Do you think is possible to make a panorama viewer with opencv and how ?
Thanks.
M.
Re: PureBasic Interface to OpenCV
Posted: Thu Dec 08, 2016 9:19 pm
by JHPJHP
Hi Mesa,
There is nothing in the package that does this, but combining OpenCV and OpenGL with PureBasic should make the process easier.
---------------------------------------------------
Updated (Windows and OSX interfaces):
- deleted 1 example
-- cv_dithering_2.pb
- renamed 1 example
-- cv_dithering_1.pb to cv_dithering.pb
- updated 1 example
-- cv_dithering.pb
NB*: Update includes various bug fixes to numerous examples.