Login  Register

Capture plugin for 64bit Java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Capture plugin for 64bit Java

Akira Funahashi
Hi,

We created an yet another capture plugin which works with 64bit Java.

  http://fun.bio.keio.ac.jp/~funa/ij/

We've tested this plugin with 64bit version of ImageJ & Fiji on my
MacBookPro (10.7.5 Lion, and 10.6.8 SnowLeopard), but it might
work on other operating systems (Windows & Linux).

The plugin requires OpenCV to be installed on the system, and
JavaCV is used to call OpenCV functions from Java
(detailed instruction is on the above URL).

We wish our code will be useful for someone interested in using
webcams with 64bit Java, and looking forward to have any feedbacks / comments.

Best,
--
Akira & Yuki

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

塚田 祐基
PS.

Remarkable point of this plugin is compatibility for iSight (MacBook,
iMac built in camera). Since "QuickTime Capture" only works with 32bit
Java, we suppose this plugin would be handy for many ImageJ users.

Best,
--
Akira & Yuki

(12/10/03 0:51), Akira Funahashi wrote::

> Hi,
>
> We created an yet another capture plugin which works with 64bit Java.
>
>    http://fun.bio.keio.ac.jp/~funa/ij/
>
> We've tested this plugin with 64bit version of ImageJ & Fiji on my
> MacBookPro (10.7.5 Lion, and 10.6.8 SnowLeopard), but it might
> work on other operating systems (Windows & Linux).
>
> The plugin requires OpenCV to be installed on the system, and
> JavaCV is used to call OpenCV functions from Java
> (detailed instruction is on the above URL).
>
> We wish our code will be useful for someone interested in using
> webcams with 64bit Java, and looking forward to have any feedbacks / comments.
>
> Best,
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Gabriel Landini
In reply to this post by Akira Funahashi
 On Tuesday 02 Oct 2012 16:51:26 Akira Funahashi wrote:
> We created an yet another capture plugin which works with 64bit Java.
>
>   http://fun.bio.keio.ac.jp/~funa/ij/
>
> We've tested this plugin with 64bit version of ImageJ & Fiji on my
> MacBookPro (10.7.5 Lion, and 10.6.8 SnowLeopard), but it might
> work on other operating systems (Windows & Linux).

Sugoi!!
This works well under linux 64 (the only detail is that one needs a different
jar file from the javacv package: instead of the javacv-macosx-x86_64.jar, I
needed the javacv-linux-x86_64.jar.

A couple of improvements:
* to be able to switch off the webcam (other than closing IJ). The "q" command
does not work under linux

* to be able to capture a sequence of images. For example this does not work
either:

for (i=0;i<10;i++){
 selectWindow("iSight Capture");
 run("Duplicate...", "title=Capture"+i);
}

For some reason the "iSight Capture" window appears in the window list under
the menu, but cannot be selected.

Many thanks for posting this, finally a webcam capture that runs under linux
straight away!
Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Gabriel Landini
In reply to this post by 塚田 祐基
In this new iSight plugin, is it possible to set the camera resolution?

Using a Philips webcam I can only get a small image, but the camera supports a
larger frame too.

Thanks

Gabriel
 

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Akira Funahashi
In reply to this post by Gabriel Landini
Hi,

Thank you so much for your feedback!

On Wed, Oct 3, 2012 at 5:38 AM, Gabriel Landini <[hidden email]> wrote:
> This works well under linux 64 (the only detail is that one needs a different
> jar file from the javacv package: instead of the javacv-macosx-x86_64.jar, I
> needed the javacv-linux-x86_64.jar.

Thank you for the news. We've updated our web page.

> A couple of improvements:
> * to be able to switch off the webcam (other than closing IJ). The "q" command
> does not work under linux

Thank you for the report. We've fixed the code. Updated version of our plugin is
on our web page:

http://fun.bio.keio.ac.jp/~funa/ij/

Updated version requires [ESC] or [Space] key to be pressed to quit the plugin
(I guess this is the same behavior with QuickTime Capture plugin).
Also, whenever you close the plugin window, it will turn off the webcam.

> * to be able to capture a sequence of images. For example this does not work
> either:
>
> for (i=0;i<10;i++){
>  selectWindow("iSight Capture");
>  run("Duplicate...", "title=Capture"+i);
> }

Thank you for the sample code. We confirmed that now this above Macro
works on our plugin.
--
Akira & Yuki

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Akira Funahashi
In reply to this post by Gabriel Landini
Hi,

On Wed, Oct 3, 2012 at 9:21 PM, Gabriel Landini <[hidden email]> wrote:
> In this new iSight plugin, is it possible to set the camera resolution?

Yes, I just updated my code. Please download the updated version of
iSight plugin from our web page.
http://fun.bio.keio.ac.jp/~funa/ij/

Now iSight plugin supports following resolutions:

QVGA     320x240
VGA       640x480
SVGA     800x600
XGA       1024x768
HD         1366×768
SXGA    1280×1024
UXGA    1600×1200
FullHD   1920×1080
WUXGA 1920×1200

Just select your favorite resolution from the menu item.
(ex. [Plugins] -> [iSight Capture Plugin] -> [Run iSight Capture
Plugin in XGA...]
will launch the plugin in XGA)
If you just launch this plugin without any resolution specified,
it will use the default resolution (depending on your webcam).

I've tested on my MacBookPro (Retina) with all resolutions
and seems working.

Best,
--
Akira

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Gabriel Landini
> > I  asled:
> > In this new iSight plugin, is it possible to set the camera resolution?
>
> Yes, I just updated my code. Please download the updated version of
> iSight plugin from our web page.
> http://fun.bio.keio.ac.jp/~funa/ij/

Very good! Yes it works perfect. The webcam I am testing supports up to VGA.
All those above also grab in VGA.
For some reason the text on the image "info line" specifying the size and
type, flickers, presumably there is no way round as this is updating the image
continuously?

Many thanks for sharing your plugin!

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Akira Funahashi
On Thu, Oct 4, 2012 at 12:52 AM, Gabriel Landini <[hidden email]> wrote:
> For some reason the text on the image "info line" specifying the size and
> type, flickers, presumably there is no way round as this is updating the image
> continuously?

Hmm... I also updated my code.
http://fun.bio.keio.ac.jp/~funa/ij/
Would this solve the problem?
# I'm sorry, it doesn't happen on my Mac, so I'm not sure this will fix...
--
Akira

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Mather
In reply to this post by Akira Funahashi
Hi,

Thx for the plugin, I would like to try it on windows 7 x64, but I get the following message.:

problem


What could be the problem?


Thank you!

M
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Nikolay
http://code.google.com/p/javacv/wiki/Windows7AndOpenCV
may be this will help you

--
Rogoshchenkov Nikolay


On Fri, Jan 18, 2013 at 9:11 AM, Mather <[hidden email]> wrote:

> Hi,
>
> Thx for the plugin, I would like to try it on windows 7 x64, but I get the
> following message.:
>
> <http://imagej.1557.n6.nabble.com/file/n5001468/problem.jpg>
>
>
> What could be the problem?
>
>
> Thank you!
>
> M
>
>
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/Capture-plugin-for-64bit-Java-tp5000270p5001468.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Mather
Hello,
Thx for the reply.....I definitely have opencv problem.:

"java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at ij.Command.runPlugIn(Command.java:148)
        at ij.Command.runCommand(Command.java:97)
        at ij.Executer.run(Executer.java:64)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\User\AppData\Local\Temp\javacpp334071595435\jniopencv_core.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
        at java.lang.Runtime.load0(Runtime.java:770)
        at java.lang.System.load(System.java:1003)
        at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:418)
        at com.googlecode.javacpp.Loader.load(Loader.java:368)
        at com.googlecode.javacpp.Loader.load(Loader.java:315)
        at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:131)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.googlecode.javacpp.Loader.load(Loader.java:334)
        at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:96)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.googlecode.javacpp.Loader.load(Loader.java:334)
        at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:85)
        at ISight_Capture.run(ISight_Capture.java:44)
        at ij.IJ.runUserPlugIn(IJ.java:184)
        at ij.IJ.runPlugIn(IJ.java:151)
        ... 8 more"

:(

M
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Akira Funahashi
Hi,

Thank you for trying the plugin on Windows7.
I tried it on my Windows7 64bit today, and confirmed the plugin to work.
I guess you haven't installed OpenCV on your Windows, or not
correctly set up the opencv environment variables (see below).

Here is the procedure to run the plugin on my Windows7 64bit.

1. Download iSight_plugin.jar and copy it to ImageJ's "plugin" folder.
2. Download javacv-0.3-bin.zip(*1) and extract the archive,
    copy 9 .jar files to above "plugin" folder.
3. Download OpenCV 2.4.3 for Windows (*2)
4. Launch OpenCV-2.4.3.exe. It will just extract the archive.
5. Set OpenCV environment variables as follows (see the details on *3)
    Assuming that OpenCV-2.4.3 is extracted on "C:\Users\User\Downloads\opencv",
    you will find "build\x64\vc10" folder under the above folder.
Let's set this path to
    OpenCV environment variable as follows:
    5.1 Launch cmd.exe and type in
          setx -m OPENCV_DIR C:\Users\User\Downloads\opencv\build\x64\vc10
    5.2 Add following path to your PATH environment variable.
          %OPENCV_DIR%\bin
         You can edit your PATH variable from Windows UI, but it might
be better to
         use "Path Editor" (*4) which has much better UI.
6. Lauch ImageJ (of Fiji), click Plugin -> ISight Plugin -> Run iSight
Capture Plugin
    (see attached screenshot)

(*1) http://code.google.com/p/javacv/downloads/detail?name=javacv-0.3-bin.zip
(*2) http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.3/OpenCV-2.4.3.exe/download
(*3) http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariable
(*4) http://www.redfernplace.com/software-projects/patheditor/

Hope this helps,
--
Akira

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

isightplugin.png (540K) Download Attachment
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

Mather
Hey,

It is awesome!!!
Thank you very very much for the plugin and for the help also!!!! Really great! :D
Isight_plugin_on_win7_x64

M
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Capture plugin for 64bit Java

noyrad
In reply to this post by Akira Funahashi
Hello,

I've followed your steps and after launching ImageJ and starting the iSight CApture Plugin I get the following message:

java.lang.UnsatisfiedLinkError: C:\Users\Daryon.MAN\AppData\Local\Temp\javacpp25865706386137\jniopencv_core.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
        at java.lang.Runtime.load0(Runtime.java:770)
        at java.lang.System.load(System.java:1003)
        at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:418)
        at com.googlecode.javacpp.Loader.load(Loader.java:368)
        at com.googlecode.javacpp.Loader.load(Loader.java:315)
        at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:131)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.googlecode.javacpp.Loader.load(Loader.java:334)
        at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:96)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.googlecode.javacpp.Loader.load(Loader.java:334)
        at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:85)
        at ISight_Capture.run(ISight_Capture.java:44)
        at ij.IJ.runUserPlugIn(IJ.java:185)
        at ij.IJ.runPlugIn(IJ.java:152)
        at ij.Executer.runCommand(Executer.java:127)
        at ij.Executer.run(Executer.java:64)
        at java.lang.Thread.run(Thread.java:619)

Can you help me getting iSight up en running?

Thanks,

noyrad