Re: [micro-manager-general] About GigE camera with micro-manager
Status: Beta
Brought to you by:
nicost
|
From: Yu L. <yul...@gm...> - 2015-03-05 00:50:34
|
Arnold,
The following is my earlier discussion with David Marshburn, the
developer of GigE driver. You might want to start from the bottom. Hope
this helps.
********************************************************************************************************************
***************** START OF MY CORRESPONDENCE WITH DAVID
************************************
********************************************************************************************************************
hi there,
as i recall, the JAI sdk has what is effectively a continuous mode of image
capture. snapImage, i think, subverts this somewhat by starting the
continuous capture, waiting for one frame, and then stopping the capture --
it matches micromanager's idea of a single snapped image (important, i
think, for instance, to avoid bleaching fluorescent samples). as i recall,
starting/stopping the continuous capture mode is what makes it very slow;
however, once it's started, capture is fast. you should notice, for
instance, that live mode is fast.
i vaguely recall that micromanager had a different method than snapImage
that was intended for continuous capture (and that was separate from what
was used for live mode). if that's correct, that would probably be the
route you want to go down and the place you want to modify the code. of
course, i may be completely wrong about that and there's only snapImage and
live mode. let me know if you can find anything out about that.
-david
On Mon, Mar 26, 2012 at 4:31 PM, Yu Liu <yul...@gm...> wrote:
> David,
> I had some progress in making the camera work with your adapter. As we
> already know, there is no TIMED mode available for this camera, and as a
> result, getExposure() always returns zero as the exposure time. According
> to the following code in snapImage()
> ***************
> while( !snapImageDone && ( GetCurrentMMTime() - startTime < MM::MMTime(
> 20 * exp * 1000 ) ) )
> {
> CDeviceUtils::SleepMs( 1 );
> }
> **************
> the device won't sleep at all since exp = 0. When I changed exp to 100
> or 1000, I was able to snap an image and take image sequences.
> The building process is also kind of tricky. I had to follow the
> documentation to build it from source, but the build script cannot finish
> it without errors. Luckily, the adapter was built successfully and it can
> be used as a replacement of the dll file installed by the official release.
> Now I am facing a new problem. It takes about 1 sec to snap an image.
> The log file didn't report any problem with snapping an image. Could you
> suggest some troubleshooting tips? I am trying to make it faster.
> Sorry for the long message, and thank you very much!
>
>
> Best,
> Liu Yu
>
> On Thu, Mar 22, 2012 at 4:07 PM, David Marshburn <mar...@cs...>
> wrote:
>
>> hi liu yu,
>>
>> for the first problem (rebuilding the demo camera adapter -- which is an
>> excellent thing to do, i think, to get your feet wet), that sort of thing
>> sounds like a conflict between the linking/runtime used for building
>> micromanager and what you used to rebuild the demo camera adapter. you
>> probably need to use the same version of visual studio as was used to build
>> the micromanager installation (or, that would be the most straightforward
>> way to fix the problem -- it's possible that you could get VS 2008 express
>> to build in the same way, but that's just speculation).
>>
>> -david
>>
>> u Ln Wed, Mar 21, 2012 at 8:26 PM, Yu Liu <yul...@gm...> wrote:
>>
>>> David,
>>> I wonder if you could take a brief look at the questions I posted on
>>> micro-manager forum (
>>> http://micro-manager.3463995.n2.nabble.com/Building-new-adapter-dll-and-Live-callback-tt7392661.html ).
>>> It seems trivial, but out of my reach. After reading your code, I feel like
>>> there is a chance I can make it work for my purpose, but the issue with
>>> building prevents me from testing it. I understand you have limited
>>> resources for this adapter, so any hint or reference would be good enough
>>> for me to start with. I appreciate it!
>>>
>>> Best,
>>> Liu Yu
>>>
>>>
>>> On Wed, Mar 14, 2012 at 6:37 PM, David Marshburn <mar...@cs...>
>>> wrote:
>>>
>>>> I was guessing that it might be something like that. The GigE cameras
>>>> that I worked with when I developed this were all over the place with their
>>>> use of naming, so it's not surprising (although, perhaps, annoying).
>>>>
>>>> The adapter is written in C++. It does try to look for several related
>>>> properties (e.g., if the camera doesn't have an ExposureTime node, it looks
>>>> for ExposureTimeAbs). There was also some weirdness in which some of our
>>>> cameras had ExposureTimeAbs as an integer instead of a real number, as the
>>>> GigE camera docs say. I hard-coded a sequence of possibilities, trying to
>>>> set ExposureMode to Timed and, failing that, then trying to set ShutterMode
>>>> to ExposureTimeAbs. Anyway, the more correct way to implement it would
>>>> probably be to have the micro-manager interface expose all of the
>>>> ExposureMode and/or ShutterMode settings as a property (and have all the
>>>> handlers for that). There's a higher-level issue, too, of how to map more
>>>> exotic exposure modes to micro-manager's idea of image capture -- I haven't
>>>> thought through that at all; it may just work.
>>>>
>>>> By the way, since I wrote this adapter, I have changed jobs, and my
>>>> current job doesn't have the ability to support development of the
>>>> adapter. Further, I don't have the facilities outside of work to do any
>>>> sort of development. So, in short, I can't do any development myself,
>>>> although I am happy to consult or advise about extending this adapter.
>>>>
>>>> Please let me know how I can help.
>>>>
>>>> -David
>>>>
>>>>
>>>> On Wed, Mar 14, 2012 at 6:47 PM, Yu Liu <yul...@gm...> wrote:
>>>>
>>>>> David,
>>>>> Just an update on what I learned from JAI. Actually, the particular
>>>>> camera doesn't follow the current naming standard. The only way to achieve
>>>>> a "Timed" exposure is to set exposure mode to be "continuous programmable"
>>>>> and use an integer tell the camera how many line time it should expose.
>>>>> Although this model is already frozen, I might try to do a little hack of
>>>>> your code to make it work. Not sure how complex the task is.
>>>>>
>>>>> Best,
>>>>> Liu Yu
>>>>>
>>>>> On Tue, Mar 13, 2012 at 9:29 AM, Yu Liu <yul...@gm...> wrote:
>>>>>
>>>>>> David,
>>>>>> Hope you had a great trip. I didn't meant to push you on this, so
>>>>>> please take your time. Attached here is the log file, and it looks like the
>>>>>> adapter failed to set the Exposure Mode to Timed. In fact, there is no
>>>>>> "Timed" mode when I checked the control tool (please see the screenshot).
>>>>>> Nico Stuurman also suspected a similar problem (
>>>>>> http://micro-manager.3463995.n2.nabble.com/About-GigE-camera-with-micro-manager-td7361976.html ).
>>>>>> It looks likes JAI may have an idea about this as well. I will also call
>>>>>> them to get some info.
>>>>>> Thank you and have a good day.
>>>>>>
>>>>>> Best,
>>>>>> Liu Yu
>>>>>>
>>>>>>
>>>>>> On Mon, Mar 12, 2012 at 7:35 PM, David Marshburn <mar...@cs...
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi Liu Yu,
>>>>>>>
>>>>>>> I have just returned from international travel. I wanted to let you
>>>>>>> know that I have received your message, and that I'll do my best to answer
>>>>>>> tomorrow. In the meantime, it would help if you can send me a
>>>>>>> micro-manager log file with Debug logging enabled (please clear the log
>>>>>>> before running as you describe below).
>>>>>>>
>>>>>>> Regards,
>>>>>>> -David
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Mar 12, 2012 at 2:15 PM, Yu Liu <yul...@gm...> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Dear David,
>>>>>>>> I was trying to send you a message through micro-manager's
>>>>>>>> forum, but not sure if it went through. My apologies if you have seen this.
>>>>>>>> I am using a JAI RM 4200 GE camera with GigE connection. It works with JAI
>>>>>>>> control tool correctly and can be detected using the sample configuration
>>>>>>>> files you provided. The image from the camera can be seen through the
>>>>>>>> "live" window.
>>>>>>>> One thing I am trying to figure out is how to set the exposure
>>>>>>>> time. It looks like I cannot change the exposure time; the exposure time
>>>>>>>> setting always goes back to 0 after changing it. As a result, all the
>>>>>>>> images acquired are just black pixels. I tried toggling Auto Shutter on and
>>>>>>>> off and it doesn't seem to make a difference.
>>>>>>>> I also noticed that if I tried to modify this configuration file
>>>>>>>> through the wizard, I couldn't do anything meaningful. In another word, all
>>>>>>>> the lists remain empty through all the steps, and I have nothing to do
>>>>>>>> other than clicking Next. I am not sure if this is normal.
>>>>>>>> Thank you very much and have a good weekend!
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Liu Yu
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>>
>>>
>>>
> ***********************************************************************************************************************************************************************************
>
************************ END OF THE CORRESPONDENCE WITH DAVID
***************************************************************************************
**************************************************************************************************************************************************************************************
On Tue, Mar 3, 2015 at 11:54 PM, mugger [via Micro-Manager] <
ml-...@n2...> wrote:
> Hi Yu,
>
> Thank you for your prompt reply. Forgive me if my question sounds stupid.
> I was actually quite confused. Shouldn’t the adapter file be in *.cfg
> format? I installed the JAI software and Micro-manager separately. When
> installation finished, I clicked the exe files to open both of them. I
> don’t know where to find the dll files that you talked about. The JAI
> software is working fine with the camera. But I never successfully opened
> it in Micro-manager.
>
> Best,
> Arnold
>
> On 4 Mar 2015, at 6:12 pm, Yu Liu [via Micro-Manager] <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=7584878&i=0>> wrote:
>
> Hello,
> It's been quite a while since I worked on the adapter and I don't
> even remember what problem I had with the JAI driver. In fact, I already
> removed the Microsoft Studio which was used to compile the adapter for the
> camera. What I do know is that I can use micromanager to acquire image or
> video using this particular camera model. I vaguely remembered that I
> changed the source code of the adapter a little bit to make it work. Still
> exposure time is not configurable. You may also need to try different
> acquisition mode of the camera. In a word, I have a working dll file (the
> adapter for the camera), and it worked with at least one of the acquisition
> mode of the camera. If you want to try the dll file with your camera, I
> will be happy to send it to you. I still wish I had wrote down what I did
> to make it work. I must have put some comments in the source code, but the
> source code is missing as well... I know this is bad bad practice...
>
>
> Best,
>
> Liu Yu
> On Mar 3, 2015 7:15 PM, "mugger [via Micro-Manager]" <<a
> href="x-msg://150/user/SendEmail.jtp?type=node&node=7584877&i=0"
> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>
>> Yu Liu wrote
>> Hello,
>> I am using a JAI RM 4200 GE camera with GigE connection. It works with
>> JAI control tool correctly and can be detected using the sample
>> configuration files provided by the developer of the adapter. The image
>> from the camera can be seen through the "live" window.
>> One thing I am trying to figure out is how to set the exposure time. It
>> looks like I cannot change the exposure time; the exposure time setting
>> always goes back to 0 after changing it. As a result, all the images
>> acquired are just black pixels. I tried toggling Auto Shutter on and off
>> and it doesn't seem to make a difference.
>> I also noticed that if I tried to modify this configuration file
>> through the wizard, I couldn't do anything meaningful. In another word, all
>> the lists remain empty through all the steps, and I have nothing to do
>> other than clicking Next. I am not sure if this is normal.
>> Thank you very much and any suggestions will be appreciated
>>
>> Best,
>> Liu Yu
>>
>> I found your thread is probably the most helpful, but I was still
>> hopeless at this point. I got even worse that. I used the GigE config file
>> provided:
>> # Generated by Configurator on Thu Feb 03 15:24:17 EST 2011
>>
>> # Reset
>> Property,Core,Initialize,0
>> ....
>>
>> But I did not get anything at all except for this error message. see the
>> attached snapshot!
>> Error: Failed to load hardware configuration...
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://micro-manager.3463995.n2.nabble.com/About-GigE-camera-with-micro-manager-tp7361976p7584874.html
>> To unsubscribe from About GigE camera with micro-manager, click here.
>> NAML
>> <http://micro-manager.3463995.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://micro-manager.3463995.n2.nabble.com/About-GigE-camera-with-micro-manager-tp7361976p7584877.html
> To unsubscribe from About GigE camera with micro-manager, click here.
> NAML
> <http://micro-manager.3463995.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://micro-manager.3463995.n2.nabble.com/About-GigE-camera-with-micro-manager-tp7361976p7584878.html
> To unsubscribe from About GigE camera with micro-manager, click here
> <http://micro-manager.3463995.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7361976&code=eXVsLmxpdXl1QGdtYWlsLmNvbXw3MzYxOTc2fC0xNjc1ODQ0ODQz>
> .
> NAML
> <http://micro-manager.3463995.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://micro-manager.3463995.n2.nabble.com/About-GigE-camera-with-micro-manager-tp7361976p7584910.html
Sent from the Micro-Manager mailing list archive at Nabble.com. |