Loading...
Logo
Processing Forum
Hi,

I'm proud to announce that JavacvPro library 0.4 beta is yet available online : http://www.mon-club-elec.fr/pmwiki_reference_lib_javacvPro/pmwiki.php

If you don't speak french, Google wil be your friend !

There is now more than 100 functions in this computer vision library (basic image Processing, coloring filter, Blob detection, convexity analysis, ...) . This version adds some new feature :
> background subtraction (with MOG algorithm..)
> SURF function
> Hough line and Circle Detection
> useful geometric functions
> additional functions for use with Nyar4Psg library (ARToolkit for Processing)

Webcam examples are now added for each function if it makes sense.
 
The online documentation with new explanations is available here : http://www.mon-club-elec.fr/pmwiki_reference_lib_javacvPro/pmwiki.php

Some very important functions are now optimized ( PImage to OpenCV and OpenCV to PImage). So, at this time, JavacvPro let you tracking color object at 80-90fps with a simple webcam (Eye PS3 under Ubuntu in my case) ! Face detection is available at 30 fps...

Enjoy.

Xavier,
www.mon-club-elec.fr
Author of JavacvPro

Replies(12)

Awesome. I will try out the new version and give some feedback here.

Thanks for the update!

Thnx a lot : Great job.
Cant find any examples on how to use Nyar4Psg..any chance on that ?
Hi Xavier, thanks for making this library!

I'm getting a Java error that occurs with the capture and tracking examples (capture blob, face detection with camera). Is there a way I can fix it?

When I run drawRectDetect, the sketch window opens briefly, then closes, and I get the following error:
Copy code
  1. #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c3429c1, pid=5528, tid=996
  2. #
  3. # JRE version: 6.0_29-b11
  4. # Java VM: Java HotSpot(TM) Client VM (20.4-b02 mixed mode windows-x86 )
  5. # Problematic frame:
  6. # C  [msvcr71.dll+0x29c1]
  7. #
  8. # An error report file with more information is saved as:
  9. # C:\Users\Bree\Documents\Processing\hs_err_pid5528.log
  10. #
  11. # If you would like to submit a bug report, please visit:
  12. #   http://java.sun.com/webapps/bugreport/crash.jsp
  13. #

Please let me know!

Thanks in advance!


Hi breegeek,

I test again the online examples for drawRectDetect and they work well (Ubuntu + GSVideo 1.0 + Processing 1-5 ).

Can you test only capture, with a sketch look like :

// Programme d'exemple de la librairie javacvPro
// par X. HINAULT - novembre 2011
// Tous droits réservés - Licence GPLv3

// Montre exemple utilisation de la capture d'un flux video avec JavacvPro et GSVideo


import codeanticode.gsvideo.*; // importe la librairie vidéo GSVideo qui implémente GStreamer pour Processing (compatible Linux)
// librairie comparable à la librairie native vidéo de Processing (qui implémente QuickTime..)- Voir Reference librairie Video Processing
// cette librairie doit être présente dans le répertoire modes/java/libraries du répertoire Processing (1-5)
// voir ici : http://gsvideo.sourceforge.net/
// et ici : http://codeanticode.wordpress.com/2011/05/16/gsvideo-09-release

import monclubelec.javacvPro.*; // importe la librairie javacvPro

GSCapture cam1; // déclare un objet GSCapture représentant une webcam
// L'objet GSCapture étend PImage - se comporte comme un conteneur des frames issues de la webcam

OpenCV opencv; // déclare un objet OpenCV principal

PImage imgSrc; 

int widthCapture=320;
int heightCapture=240;
int fpsCapture=20; 

void setup(){ // fonction d'initialisation exécutée 1 fois au démarrage

        size(widthCapture*2,heightCapture); 

	//======== Initialisation Objets GSVideo (capture et/ou lecture video =========

	// GSCapture(this, int requestWidth, int requestHeight,  [int frameRate],[String sourceName], [String cameraName]) 
        cam1= new GSCapture(this, widthCapture, heightCapture); // Initialise objet GSCapture désignant webcam - depuis GSVideo 1.0
	//cam1 = new GSCapture(this, widthCapture, heightCapture,fpsCapture,"v4l2src","/dev/video0"); // Initialise objet GSCapture désignant webcam - avant GSVideo 1.0
        //cam1 = new GSCapture(this, widthCapture, heightCapture,"v4l2src","/dev/video0", fpsCapture); // Initialise objet GSCapture désignant webcam - depuis GSVideo 1.0
	// largeur et hauteur doivent être compatible avec la webcam - typiquement 160x120 ou 320x240 ou 640x480...
	// Meilleurs résultats avec framerate webcam entre 20 et 30 et frameRate programme idem ou multiple plus grand (40 pour 20 par ex)
	// la liste des webcam installées sous Ubuntu (Gnu/Linux) est donnée par la commande : ls /dev/video* 

	// cam1.play();  // démarre objet GSCapture = la webcam - version GSVideo avant 0.9
	cam1.start();  // démarre objet GSCapture = la webcam - version GSVideo après 0.9

	//======== Initialisation Objets OpenCV (librairie javacvPro : traitement d'image et reconnaissance visuelle) =========

	opencv = new OpenCV(this); // initialise objet OpenCV à partir du parent This
        opencv.allocate(widthCapture,heightCapture); // crée le buffer image de la taille voulue



}


void  draw() { // fonction exécutée en boucle

  if (cam1.available() == true) { // si une nouvelle frame est disponible sur la webcam
    cam1.read(); // acquisition d'un frame 

    imgSrc=cam1.get(); // récupère l'image GS video dans Pimage
    opencv.copy(imgSrc); // charge l'image dans le buffer openCV

    //opencv.copy(cam1.get()); // autre possibilité - charge directement l'image GSVideo dans le buffer openCV

    image(opencv.getBuffer(),0,0); // affiche flux vidéo direct depuis OpenCV

    opencv.invert(); // applique traitement sur flux vidéo

    image(opencv.getBuffer(),widthCapture,0); // affiche flux vidéo direct depuis OpenCV



  } // fin if available

}

Does it work ?

Xavier.


Thnx a lot for your quick answer ! The examples on your webpage are good and sufficient for my purpose.
I did not find them, because your webpage looks quite scattered in my browser: I use IE9 on vista.
Greetings knut
I need to learn french :)

@sensor56 ,thank you for the update! i'm just wondering is there any way could be integration with GLGraphics for fast video capture by using GLTexture object.

something like this

Copy code
  1.   tex = new GLTexture(this);
      cam.setPixelDest(tex);    
      cam.start();
Copy code
    Copy code
      Copy code
        but how to make this working with opencv.copy()?
      Copy code
        thank you!
      I cant find a method to get the 3D Matrix Values for a Marker. Can you please help.
      knut
      Hello Xavier, what's happen with your javacvpro  page? It says that the account had been suspended..is it going to be up again? Or is it up elsewhere?
      Working with your library... great so far...but it helps to have some documentation..even it's in French ;-)
      Hi,

      My Mavenhosting server have a problem today. We are working around. Don't worry...

      Xavier.

      Hello,

      Javacvpro seems to be a really wonderful work.

      i want to test it but it doesn't work with my computer.

      Here's what i've done :

      Macbook Pro
      macosx lion 10.7.5
      xcode4 downloaded
      Processing 2.0b6

      1 - Downloaded MacPort
      2 - Installed it on my computer
      3 - Launched Terminal, executed command :  sudo port install opencv
      4 - Downloaded javacvpro  0.5 library for processing ( http://www.mon-club-elec.fr/pmwiki_reference_lib_javacvPro/pmwiki.php)
      5 - Unzipped it and put it in the Processing Libraries Folder
      6 - Launched Processing
      7 - In processing, Preference's Menu, check 64 bits Mode
      8 - Test 'convexityDefects' of the library

      and…

      it doesn't work.

      In the Monitor :

      Copy code
      1. UnsatisfiedLinkError: /private/var/folders/d7/4dps_y45649f_p5xcp8grvph0000gn/T/libjniopencv_core7674351826408248864.dylib:  Library not loaded: /opt/local/lib/libopencv_core.2.3.dylib   Referenced from: /private/var/folders/d7/4dps_y45649f_p5xcp8grvph0000gn/T/libjniopencv_core7674351826408248864.dylib   Reason: image not found

      Someone for help ?