LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CANON EOS Livewiev

Hello,

i'm usig CVI 2009 and in one of my projects i have to control a canon eos
camera via the canon eos sdk. In generell i get the sdk to work, can "talk"
to the camera, set the camera....
But i also want to activate the liveview an i don't no how to display the
stream in a panel.
There is an example in the sdk:

EdsStreamRef stream = NULL;
EdsEvfImageRef evfImage = NULL;

// Create memory stream.
err = EdsCreateMemoryStream( 0, &stream);

// Create EvfImageRef.
err = EdsCreateEvfImageRef(stream, &evfImage);

// Display image
//

// Release stream
EdsRelease(stream);

// Release evfImage
EdsRelease(evfImage);

I don't understand what i have to do to display the image. i see that there
is stream and evfImage but what is the next step to make these image
visible?

Any ideas?

Thanks for any help,

Norbert


0 Kudos
Message 1 of 10
(8,457 Views)

Hello Norbert,

 

I have some questions for you:

 

1. Which CANON EOS camera do you use?

2. Support National Instruments this camera?

http://sine.ni.com/apps/utf8/nipc.specs?action=search&asid=1102

http://digital.ni.com/public.nsf/allkb/4331B4AA3AE95233862574C200539A2F?OpenDocument

 

3. Do you use a National Instruments Vision Software?

http://www.ni.com/vision/software/

 

4. How do you connect your CANON EOS camera to you PC?

http://joule.ni.com/nidu/cds/view/p/id/415/lang/en

 

Using Functions Defined by Both LabWindows/CVI and the Win32 SDK:

http://zone.ni.com/devzone/cda/epd/p/id/3938


Changing Camera Configuration Programmatically.

http://zone.ni.com/devzone/cda/epd/p/id/1212

 

Calibration Examples

http://zone.ni.com/devzone/cda/epd/p/id/897

 

You can find more examples on this page:

http://www.ni.com/code/

 

Best Regards,

Phanuel

0 Kudos
Message 2 of 10
(8,406 Views)
Hi Phanual,

I'm using the canon EOS 1Ds Mark III camera. The camera is not supported by
NI as far as i know. I do not use the Vision Software.

Thanks for the links, but i actually don't have problems to connect to the
camera (via usb and the vendor sdk). My problem is to display the liveview
image.
I found some functions in the canon venor sdk, so i'm able to request the
liveview jpg image from the camera via streaming functions. So i have a loop
that provides me with array of the actual liveview image (in jpg format) and
infos abaout the size.

No i'm looking for a direct way to get the image to my canvas. What i get
from the vendor sdk is an array (with all the jpg data) and the size of the
array.
Because i don't have the vision software i actually save the image array as
"liveview.jpg", then reload it by GetBitmapFromFile() and
CanvasDrawBitmap().
I'm looking for a solution to put the image array direct to the screen
without saving and reloading. Maybe that its possible with the vision
software, but boss says that i can't buy it for this single project......
So i hope that there is another "workaround". To increase the speed i'm
using a ramdisk for saving and reloading the file instead of a harddisk, but
i still think that it's no good and fast solution to di it the "file" way.

Thanks

Norbert



> 2. Support National Instruments this camera?
> <a
> href="http://sine.ni.com/apps/utf8/nipc.specs?action=search&amp;asid=1102"
> target="_blank"
> rel="nofollow">http://sine.ni.com/apps/utf8/nipc.specs?action=search&amp;asid=1102</a>
> <a
> href="http://digital.ni.com/public.nsf/allkb/4331B4AA3AE95233862574C200539A2F?OpenDocument"
> target="_blank"
> rel="nofollow">http://digital.ni.com/public.nsf/allkb/4331B4AA3AE95233862574C200539A2F?OpenDocument</a>
> &nbsp;
> 3. Do you use a National Instruments Vision Software?
> <a href="http://www.ni.com/vision/software/" target="_blank"
> rel="nofollow">http://www.ni.com/vision/software/</a>
> &nbsp;
> 4. How do you connect your CANON EOS camera to you PC?
> <a href="http://joule.ni.com/nidu/cds/view/p/id/415/lang/en"
> target="_blank"
> rel="nofollow">http://joule.ni.com/nidu/cds/view/p/id/415/lang/en</a>
> &nbsp;
> Using Functions Defined by Both LabWindows/CVI and the Win32 SDK:
> <a href="http://zone.ni.com/devzone/cda/epd/p/id/3938" target="_blank"
> rel="nofollow">http://zone.ni.com/devzone/cda/epd/p/id/3938</a>
>
>
> Changing Camera Configuration Programmatically.
> <a href="http://zone.ni.com/devzone/cda/epd/p/id/1212" target="_blank"
> rel="nofollow">http://zone.ni.com/devzone/cda/epd/p/id/1212</a>
> &nbsp;
> Calibration Examples
> <a href="http://zone.ni.com/devzone/cda/epd/p/id/897" target="_blank"
> rel="nofollow">http://zone.ni.com/devzone/cda/epd/p/id/897</a>
> &nbsp;
> You can find more examples on this page:
> <a href="http://www.ni.com/code/" target="_blank"
> rel="nofollow">http://www.ni.com/code/</a>
> &nbsp;
> Best Regards,
> Phanuel


0 Kudos
Message 3 of 10
(8,391 Views)

Hi Norbert,

 

Convert Array to Image (LabVIEW + VISION)

http://decibel.ni.com/content/docs/DOC-4155

 

Do you use the "Picture Control"?

http://zone.ni.com/reference/en-XX/help/370051P-01/cvi/uiref/cvipicture_control_overview/

 

Using the Picture Control to Enhance the User Interface:

http://zone.ni.com/devzone/cda/epd/p/id/4889

 

You can also use the canvas control.

Using a Canvas Control to Graph Data:

http://zone.ni.com/devzone/cda/epd/p/id/3475

 

Convert Image to Array:

http://zone.ni.com/devzone/cda/epd/p/id/877

 

Calling a DLL in CVI: Explicit Linking vs. Implicit Linking (Dynamic vs. Static)

http://zone.ni.com/devzone/cda/tut/p/id/8503

 

 

 

Best Regards,

Phanuel

 

0 Kudos
Message 4 of 10
(8,299 Views)

If you just want to display the image, look into a library on the NI Device Driver Reference CD called NI-IMAQ.

There is a very fast image write routine for a canvas control called imgPlot.

0 Kudos
Message 5 of 10
(8,274 Views)
Hi jrbecker,

that sounds very helpful. I will have a look at the NI-IMAQ!

Thanks also to phanuel, but i think that you didn't realy understood what my
problem is. I don't have an array of the image, i have a array with the file
contens of a jpg image, thats a big difference! Thats why i save it as a
file and than reload it.
But i hope that the hint from jrbecker is what i'm looking for.

Thanks

Norbert



"jrbecker" <x@no.email> schrieb im Newsbeitrag
news:1292438429484-1388766@exchange.ni.com...
> If you just want to display the image, look into a library on the NI
> Device Driver Reference CD called NI-IMAQ.
> There is a very fast image write routine for a canvas control called
> imgPlot.


0 Kudos
Message 6 of 10
(8,253 Views)

Hi,

found this thread as I'm also going through this in these very days. This is rather a Canon EDSDK question. Anyway, if still relevant, the answer, which is undocumented by Canon, but apparently known to developers, is that the evf buffer gest filled with a jpeg stream, which you have to decode. There is no VI in labview doing this in memory (I don't know about labwindows), the detour would be either save the stream to a file and reload it (I hate), using some contributed ad hoc function (e.g. http://decibel.ni.com/content/docs/DOC-13513). But the real answer is that the function EdsGetImage can transform jpeg data into an RGB stream, which with further gymnastics can be casted into an IMAQ image.

For a labview implementation: http://groups.yahoo.com/group/CanonSDK/attachments/folder/446301336/item/1078603953/view?picmode=ori...

In general, www.canonsdk.com and http://groups.yahoo.com/group/CanonSDK/ are valuable resources here.

HTH, Enrico

0 Kudos
Message 7 of 10
(7,986 Views)

Hello,

 

I'm thinking about trying this with a Canon EOS. Did anybody get this to work?

0 Kudos
Message 8 of 10
(6,701 Views)

Of course (in Labview, not Labwindows). http://groups.yahoo.com/neo/groups/CanonSDK/conversations/topics/1626 , http://groups.yahoo.com/neo/groups/CanonSDK/conversations/messages/1716 . LV2010, SDK 2.9, certainly not 2.10 and no intention to check any other version.

Message 9 of 10
(6,697 Views)

Hi Jeff,

 

yes i got it to work. Actually we use different models of Canon EOS and the Canon EOS SDK 2.130. 

 

Greetings Norbert

 

0 Kudos
Message 10 of 10
(6,679 Views)