Converting a snapped image from usb webcam to rgb model color
Hellow everyone,
I am trying to convert a snapped image using usb webcam to RGB model. I have two VIs, for snapping and the other for converting JPEG to RGB as the attached VIs bellow. My problem is how to connect these two VIs in one VI to make direct conversion from snapping to RGB model. I am using LABVIEW 8.6
Attachments:
NI-IMAQ for USB Snap LV 86.vi 43 KB
GetRGB_LV71.vi 30 KB
So the two VIs that you have are not directly compatible with each other. Notice that the first one uses IMAQ VIs (an add-on), while the second is using VIs from NI's Base Package. This means that the first VI (the snap) outputs an "Image" type, while the second VI is using an "imagedata" type.
To clarify, you want the histogram of each color in the image, is that right? This is what a histogram is:
http://zone.ni.com/reference/en-XX/help/372916J-01/nivisionconcepts/histogram/
If so, you can use the IMAQ ExtractColorPlanes VI to extract each individual color plane...
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_extractcolorplanes/
...and then you can use the IMAQ Histogram VI to map the histogram of that color plane.
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_histogram/
Ravi A.
National Instruments | Applications Engineer
Similar Messages
-
Hey everyone. I have a Logitech USB webcam that I would like to use to acquire still images. I am using LV 8.2. All the posts I have read suggest using NI-IMAQ for USB Cameras. I have tried to install it, but it says "You must have Vision 7.1 or higher with LabVIEW 7.0 or higher, or you must have Vision Assistant 7.1 or higher installed to use this add-on." I don't have Vision or Vision Assistant. Am I doing something wrong? None of the other posts seemed to mention that you needed Vision in order to use the add-on. Does anyone know how I can acquire images from my USB webcam through LV 8.2 without having to buy additional software? Thanks!
Jay Mathews
CPP, Inc.This question comes up often. That driver is something that NI provides as a convenience, and yes it requires additional software, as stated on the description for it. As for alternatives, did you get any software with the camera that looks like it could be used with LabVIEW, like an ActiveX library? That can certainly be used. As mentioned in this thread, supposedly RoboLab for LabVIEW has some tools, but I've never used it myself. You can also try the LabVIEW Webcam Library. Kind of old, though.
-
Capturing data from usb webcam
I'm interested in the acquisition of footage from a usb webcam into labVIEW. I have the professional development system and downloaded NI-IMAQ which I believe i'll need from reading online material.
I don't really know where to start to link the camera with labview so any material would be a great help...
Final question, is it a big undertaking acquiring data from a video camera in labVIEW? it's just i've limited time to work on a project and want to know if it's worthwhile undertaking or if it will be very time heavy. I've a few months labVIEW development experience if that would give an indication to anyone...
StrokesHi,
First your USB Cam needs to be DirectShow Compliant.
Then you will need NI-IMAQdx from the Vision Acquisition Software 2009 (supports LV 8.2 and higher) or higher to acquire images from USB cameras. The NI IMAQ driver is to capture images from framegrabbers, and the NI SmartCamera, not for USB. There is also a own IMAQ USB Library for the Vision Acquisition 8.6 but since you need to buy the Acquisition Software I would recommend to use 2009 or higher where we added the DirectShow Support to IMAQdx.
The Vision Acquisition Software is just for image acquisition and processing. If you want to do image processing you will need the Vision Development Module.
And when doing a search at ni.com you should find some articles, examples and tutorials too.
I can't estimate how much time you will need get that running, but you could just try to run one of the examples for IMAQdx in LabVIEW and then see how it works.
Christian -
Acquire an image from a webcam ?
I search a way to acquire an image from a webcam. I already tried with the
TWAIN issue but the GUI of the webcam is displayed and I need to press the
acquire button to receive the image. I would like to be able to acquire an
image directely. I would like to try the Video For Windows issue but I can't
find the LVVFW.VI or LLB file.
Can you suggest something ?Hi Mourgue,
Try one of the following if it's a USB camera ?! ;
http://www.info-labview.org/the-archives/vi/lv6/Logitech%20QuickCam%20LabVIEW%20Driver%20v1.0.txt
http://www.info-labview.org/the-archives/vi/lv6/Logitech%20QuickCam%20LabVIEW%20Driver%20v1.0.zip
-------------- OR --------------------
Video For Window LabVIEW driver ;
http://exchange.ni.com/servlet/com.quiq.servlet.GetObject/lv_vfw.zip?KEY=101.97.12134.14&SIG=101.97.12134.14&EXT=mime:application/x-zip-compressed
I Hope that you 'get on' with it - good luck
Regards
Torben ?stergaard-Andersen -
Capture image from usb camera::step
hi
i want use labview to caputre image from my webcam
what are the ni drivers that required or step??
i use la 2012
regards
hi ?Q>Duplicate. Discussions will continue over there.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies -
Get an image from USB cam without NI VIsion Acquisition
HI
I am looking for a way to capture images from USB cam without using a paid library ImaxDx for Labview.
Have you any ideas?Hello MaxEngee
Off hand, I suppose you could run the third party capture software in the background and have a LabVIEW scan the target directy for changes/new images and import the image as necessary.
In the mean time, if you install the NI Vision Acquisition Software, you do have a 30-day trial period so perhaps you may consider exploring the environment to see if it is right for you.
NI Vision Acquisition Software 2011.09 - Windows 7 x86/XP/Vista/7 64 bit
http://joule.ni.com/nidu/cds/view/p/id/2625/lang/en
Thank you for choosing National Instruments!
Sincerely,
Greg S. -
My RGB colors are turning to cmyk while bringing image from illustrator or photoshop. Why?
Removing the image from that page bright RGB colors are back.. hmmEdit > Transparency Blend Space > Document RGB
-
How to capture image from USB camera in Labview 2010
Hey all,
I am very new to Labview but am working on a project that requires me to use a sensor to send a signal to Labview to capture an image from a USB camera and save. Then apply some image processing to do some geometric calculations. The calculation will be based on pixels so I guess the image needs to be in bitmap form. Right now I am just trying to start with the image acquisition part and was wondering if this can be done in Labview 2010. I have the vision toolbox and NXT Robotics. Are there any examples on this website that will help and do I have te proper tools to do this? Once I get the image capture/grab to work using labview, then I could work getting a sensor signal to trigger that capture and finally the processing side.
Like I said, I am very new to this so I am not sure if I need to download any particular drivers or vi's that I am missing or what those might be. Can someone provide some insight, links, or any help would be appreciated.
Thanks in advance for any help/suggestions.Hi wklove,
In order to do vision with LabVIEW you need to to have the Vision development module and have NI Vision Acquisition Software (VAS) installed. It sounds like you are missing VAS you can download it here. Once you have this installed you should be able to see your camera in Measurement and Automation (MAX). After you are able to see the camera, take a look at the NI Example Finder by going to Help » Find Examples
Joe Daily
National Instruments
Applications Engineer
may the G be with you .... -
Capturing live image from integrated Webcam using Labview
How can i capture live image from my laptop integrated webcam using LabVIEW ?
Even after installing all the IMAQ drivers, MAX is not displaying my integrated webcam ?
Why is it so ?
do i need to install some additional drivers for this ?
Thanks and Regards
Gaurav Palhi, you can use NI Vision Assistant
IDE ofNI Vision Assistant
..select acquire images
...select option 2
...select devices: CAM0 (default webcam), video mode resolution
...option 1 acquire single, option 2 acquire continuous
Atom
Certified LabVIEW Associate Developer -
VM creation fails copying image from USB NTFS disk
As I have limited disk space available on the server I copied the VM Template to an 500 GB NTFS USB drive and mounted it on /OVS/seed_pool
When creating the virtual machine it throws the following error:
Check Agent Version
Check Address and NetworkType
Register virtual machine img
Register virtual machine geninfo
Register networks
Register virtual disks
CopyFromTemplateAsync:Call agent
CopyFromTemplateCallBack
CallBack:end-success:end:failed:<Exception: ['dd', 'if=/var/ovs/mount/EC31AC07D7274BF3BF9D093861391DF4/seed_pool/OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM/ebs1211db.img', 'iflag=direct', 'of=/var/ovs/mount/EC31AC07D7274BF3BF9D093861391DF4/running_pool/40_EBS_DEMO_DB/ebs1211db.img', 'bs=1M'] => dd: opening `/var/ovs/mount/EC31AC07D7274BF3BF9D093861391DF4/seed_pool/OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM/ebs1211db.img': Invalid argument
>
StackTrace:
File "/opt/ovs-agent-2.3/OVSXUtility.py", line 355, in utl_cp_vm
cmd = ["dd", "if=%s" % src, "iflag=direct", "of=%s" % dst, "bs=1M"]
File "/opt/ovs-agent-2.3/OVSCommons.py", line 85, in run_cmd
raise Exception('%s => %s' % (cmdlist, p.childerr.read()))
Problem is: 'dd iflag=direct' isn't supported by fs type ntfs-3g which is the one used for mounting the USB drive.
I modified OVSXUtility.py and compiled it into OVSXUtility.pyc ... still VM Manager keeps running the original. (I am not python versed)
Is there any workaround?Or if you don't want to repartition your USB drive, just use dd to create a large file big enough to hold your image and format that as ext3 and mount it, move your image into it and have fun.
-
Iphoto won't open/accept images from USB drive
Hello. I copied a bunch of photos from another mac onto a USB drive. Then I put them on my desktop. They are all jgp files (IMG_033.jpg, for example) , but I can't open any of them. I can't open them from the desktop, I can't drag them into iphoto, and I can't do it by importing from iphoto. I also tried renaming the files and using preview (based on what someone said in another posting) and that doesn't work either. I get messages that say "Unreadable file cannot be imported" (when I try via iphoto) or "original item can't be found" (when I try from desktop or preview).
Help?nasreen
original item can't be found" (when I try from desktop or preview).
Sounds like you didn't copy the files to the usb device, but instead made aliases to them.
Do the icons have a little arrow on them? What size are the files?
Regards
TD -
Moving images from Lightroom to Photoshop 2014 CC – Color Problems?
For some reason, whenever I select "Edit in Photoshop 2014 CC", the image color is not only extremely different from what's displayed in Lightroom, it's dark and dull. However, if I export the image as a .jpg and then import it into Photoshop 2014 CC the color looks the same as what's displayed in Lightroom and this is with NO color correction.
Why is this happening and how should I be moving files between the two apps? BTW, I shot the images with a Canon T3i that saves the image as a CR2 and JPG.
Thanks!I'm running Lightroom and Photoshop CS3. "Edit image in Photoshop CS3" works fine for me. I'm on an iMac and had Lightroom installed first, only thing I noticed is it takes PS a little longer to open up.
-
Capturing an image from webcam
hi, i'm trying to capture a image from a webcam, but i don't have a clue of how to do this, could anyone help me with samples or books.
thanks.hi
so as i understood u want to access the USB and make whats called camera interaction i worked with my webcam and i generate a video stream and i'm working now to sample this video
i found these class on the internet u have to make a littel changes like camera defention
* File: DeviceInfo.java.java
* created 24.07.2001 21:44:12 by David Fischer, [email protected]
import java.awt.Dimension;
import javax.media.*;
import javax.media.control.*;
import javax.media.format.*;
import javax.media.protocol.*;
public class DeviceInfo
public static Format formatMatches (Format format, Format supported[] )
if (supported == null)
return null;
for (int i = 0; i < supported.length; i++)
if (supported.matches(format))
return supported[i];
return null;
public static boolean setFormat(DataSource dataSource, Format format)
boolean formatApplied = false;
FormatControl formatControls[] = null;
formatControls = ((CaptureDevice) dataSource).getFormatControls();
for (int x = 0; x < formatControls.length; x++)
if (formatControls[x] == null)
continue;
Format supportedFormats[] = formatControls[x].getSupportedFormats();
if (supportedFormats == null)
continue;
if (DeviceInfo.formatMatches(format, supportedFormats) != null)
formatControls[x].setFormat(format);
formatApplied = true;
return formatApplied;
public static boolean isVideo(Format format)
return (format instanceof VideoFormat);
public static boolean isAudio(Format format)
return (format instanceof AudioFormat);
public static String formatToString(Format format)
if (isVideo(format))
return videoFormatToString((VideoFormat) format);
if (isAudio(format))
return audioFormatToString((AudioFormat) format);
return ("--- unknown media device format ---");
public static String videoFormatToString(VideoFormat videoFormat)
StringBuffer result = new StringBuffer();
// add width x height (size)
Dimension d = videoFormat.getSize();
result.append("size=" + (int) d.getWidth() + "x" + (int) d.getHeight() + ", ");
// try to add color depth
if (videoFormat instanceof IndexedColorFormat)
IndexedColorFormat f = (IndexedColorFormat) videoFormat;
result.append("color depth=" + f.getMapSize() + ", ");
// add encoding
result.append("encoding=" + videoFormat.getEncoding() + ", ");
// add max data length
result.append("maxdatalength=" + videoFormat.getMaxDataLength() + "");
return result.toString();
public static String audioFormatToString(AudioFormat audioFormat)
StringBuffer result = new StringBuffer();
// short workaround
result.append(audioFormat.toString().toLowerCase());
return result.toString();
the second class:
* File: MyDataSinkListener.java
* created 24.07.2001 21:41:47 by David Fischer, [email protected]
* Decription: simple data sink listener, used to check for end of stream
import javax.media.datasink.*;
public class MyDataSinkListener implements DataSinkListener
boolean endOfStream = false;
public void dataSinkUpdate(DataSinkEvent event)
if (event instanceof javax.media.datasink.EndOfStreamEvent)
endOfStream = true;
public void waitEndOfStream(long checkTimeMs)
while (! endOfStream)
Stdout.log("datasink: waiting for end of stream ...");
try { Thread.currentThread().sleep(checkTimeMs); } catch (InterruptedException ie) {}
Stdout.log("datasink: ... end of stream reached.");
* File: MyDataSinkListener.java
* created 24.07.2001 21:41:47 by David Fischer, [email protected]
* Decription: simple data sink listener, used to check for end of stream
import javax.media.datasink.*;
public class MyDataSinkListener implements DataSinkListener
boolean endOfStream = false;
public void dataSinkUpdate(DataSinkEvent event)
if (event instanceof javax.media.datasink.EndOfStreamEvent)
endOfStream = true;
public void waitEndOfStream(long checkTimeMs)
while (! endOfStream)
Stdout.log("datasink: waiting for end of stream ...");
try { Thread.currentThread().sleep(checkTimeMs); } catch (InterruptedException ie) {}
Stdout.log("datasink: ... end of stream reached.");
}[i]the 3rd class:/******************************************************
* File: Stdout.java.java
* created 24.07.2001 21:44:46 by David Fischer, [email protected]
* Description: utility class for standard output
public class Stdout
public static void log(String msg)
System.out.println(msg);
public static void logAndAbortException(Exception e)
log("" + e);
flush();
System.exit(0);
public static void logAndAbortError(Error e)
log("" + e);
flush();
System.exit(0);
public static void flush()
System.out.flush();
the 4rt is :
* File: TestQuickCamPro.java
* created 24.07.2001 21:40:13 by David Fischer, [email protected]
* Description: this test program will capture the video and audio stream
* from a Logitech QuickCam� Pro 3000 USB camera for 10 seconds and stores
* it on a file, named "testcam.avi". You can use the microsoft windows
* media player to display this file.
* operating system: Windows 2000
* required hardware: Logitech QuickCam� Pro 3000
* required software: jdk 1.3 or jdk1.4 plus jmf2.1.1 (www.javasoft.com)
* source files: DeviceInfo.java, MyDataSinkListener.java,
* Stdout.java, TestQuickCamPro.java
* You can just start this program with "java TestQuickCamPro"
* hint: please make shure that you setup first the logitech camerea drives
* and jmf2.1.1 correctly. "jmf.jar" must be part of your CLASSPATH.
* useful links:
* - http://java.sun.com/products/java-media/jmf/2.1.1/index.html
* - http://java.sun.com/products/java-media/jmf/2.1.1/solutions/index.html
* with some small modifications, this program will work with any USB camera.
import java.io.*;
import javax.media.*;
import javax.media.control.*;
import javax.media.datasink.*;
import javax.media.format.*;
import javax.media.protocol.*;
public class TestQuickCamPro
private static boolean debugDeviceList = false;
private static String defaultVideoDeviceName = "vfw:Microsoft WDM Image Capture (Win32):0";
private static String defaultAudioDeviceName = "DirectSoundCapture";
private static String defaultVideoFormatString = "size=176x144, encoding=yuv, maxdatalength=38016";
private static String defaultAudioFormatString = "linear, 16000.0 hz, 8-bit, mono, unsigned";
private static CaptureDeviceInfo captureVideoDevice = null;
private static CaptureDeviceInfo captureAudioDevice = null;
private static VideoFormat captureVideoFormat = null;
private static AudioFormat captureAudioFormat = null;
public static void main(String args[])
// get command line arguments
for (int x = 0; x < args.length; x++)
// -dd = debug devices list -> display list of all media devices - and exit
if (args[x].toLowerCase().compareTo("-dd") == 0)
debugDeviceList = true;
// get a list of all media devices, search default devices and formats, and print it out if args[x] = "-dd"
Stdout.log("get list of all media devices ...");
java.util.Vector deviceListVector = CaptureDeviceManager.getDeviceList(null);
if (deviceListVector == null)
Stdout.log("... error: media device list vector is null, program aborted");
System.exit(0);
if (deviceListVector.size() == 0)
Stdout.log("... error: media device list vector size is 0, program aborted");
System.exit(0);
for (int x = 0; x < deviceListVector.size(); x++)
// display device name
CaptureDeviceInfo deviceInfo = (CaptureDeviceInfo) deviceListVector.elementAt(x);
String deviceInfoText = deviceInfo.getName();
if (debugDeviceList)
Stdout.log("device " + x + ": " + deviceInfoText);
// display device formats
Format deviceFormat[] = deviceInfo.getFormats();
for (int y = 0; y < deviceFormat.length; y++)
// serach for default video device
if (captureVideoDevice == null)
if (deviceFormat[y] instanceof VideoFormat)
if (deviceInfo.getName().indexOf(defaultVideoDeviceName) >= 0)
captureVideoDevice = deviceInfo;
Stdout.log(">>> capture video device = " + deviceInfo.getName());
// search for default video format
if (captureVideoDevice == deviceInfo)
if (captureVideoFormat == null)
if (DeviceInfo.formatToString(deviceFormat[y]).indexOf(defaultVideoFormatString) >= 0)
captureVideoFormat = (VideoFormat) deviceFormat[y];
Stdout.log(">>> capture video format = " + DeviceInfo.formatToString(deviceFormat[y]));
// serach for default audio device
if (captureAudioDevice == null)
if (deviceFormat[y] instanceof AudioFormat)
if (deviceInfo.getName().indexOf(defaultAudioDeviceName) >= 0)
captureAudioDevice = deviceInfo;
Stdout.log(">>> capture audio device = " + deviceInfo.getName());
// search for default audio format
if (captureAudioDevice == deviceInfo)
if (captureAudioFormat == null)
if (DeviceInfo.formatToString(deviceFormat[y]).indexOf(defaultAudioFormatString) >= 0)
captureAudioFormat = (AudioFormat) deviceFormat[y];
Stdout.log(">>> capture audio format = " + DeviceInfo.formatToString(deviceFormat[y]));
if (debugDeviceList)
Stdout.log(" - format: " + DeviceInfo.formatToString(deviceFormat[y]));
Stdout.log("... list completed.");
// if args[x] = "-dd" terminate now
if (debugDeviceList)
System.exit(0);
// setup video data source
MediaLocator videoMediaLocator = captureVideoDevice.getLocator();
DataSource videoDataSource = null;
try
videoDataSource = javax.media.Manager.createDataSource(videoMediaLocator);
catch (IOException ie) { Stdout.logAndAbortException(ie); }
catch (NoDataSourceException nse) { Stdout.logAndAbortException(nse); }
if (! DeviceInfo.setFormat(videoDataSource, captureVideoFormat))
Stdout.log("Error: unable to set video format - program aborted");
System.exit(0);
// setup audio data source
MediaLocator audioMediaLocator = captureAudioDevice.getLocator();
DataSource audioDataSource = null;
try
audioDataSource = javax.media.Manager.createDataSource(audioMediaLocator);
catch (IOException ie) { Stdout.logAndAbortException(ie); }
catch (NoDataSourceException nse) { Stdout.logAndAbortException(nse); }
if (! DeviceInfo.setFormat(audioDataSource, captureAudioFormat))
Stdout.log("Error: unable to set audio format - program aborted");
System.exit(0);
// merge the two data sources
DataSource mixedDataSource = null;
try
DataSource dArray[] = new DataSource[2];
dArray[0] = videoDataSource;
dArray[1] = audioDataSource;
mixedDataSource = javax.media.Manager.createMergingDataSource(dArray);
catch (IncompatibleSourceException ise) { Stdout.logAndAbortException(ise); }
// create a new processor
// setup output file format ->> msvideo
FileTypeDescriptor outputType = new FileTypeDescriptor(FileTypeDescriptor.MSVIDEO);
// setup output video and audio data format
Format outputFormat[] = new Format[2];
outputFormat[0] = new VideoFormat(VideoFormat.INDEO50);
outputFormat[1] = new AudioFormat(AudioFormat.GSM_MS /* LINEAR */);
// create processor
ProcessorModel processorModel = new ProcessorModel(mixedDataSource, outputFormat, outputType);
Processor processor = null;
try
processor = Manager.createRealizedProcessor(processorModel);
catch (IOException e) { Stdout.logAndAbortException(e); }
catch (NoProcessorException e) { Stdout.logAndAbortException(e); }
catch (CannotRealizeException e) { Stdout.logAndAbortException(e); }
// get the output of the processor
DataSource source = processor.getDataOutput();
// create a File protocol MediaLocator with the location
// of the file to which bits are to be written
MediaLocator dest = new MediaLocator("file:testcam.avi");
// create a datasink to do the file
DataSink dataSink = null;
MyDataSinkListener dataSinkListener = null;
try
dataSink = Manager.createDataSink(source, dest);
dataSinkListener = new MyDataSinkListener();
dataSink.addDataSinkListener(dataSinkListener);
dataSink.open();
catch (IOException e) { Stdout.logAndAbortException(e); }
catch (NoDataSinkException e) { Stdout.logAndAbortException(e); }
catch (SecurityException e) { Stdout.logAndAbortException(e); }
// now start the datasink and processor
try
dataSink.start();
catch (IOException e) { Stdout.logAndAbortException(e); }
processor.start();
Stdout.log("starting capturing ...");
try { Thread.currentThread().sleep(10000); } catch (InterruptedException ie) {} // capture for 10 seconds
Stdout.log("... capturing done");
// stop and close the processor when done capturing...
// close the datasink when EndOfStream event is received...
processor.stop();
processor.close();
dataSinkListener.waitEndOfStream(10);
dataSink.close();
Stdout.log("[all done]");
}finally search with the athour name there is an additional program u must download to detect ur cam .
i hope that is work with u -
Video image from webcam resizes
I am trying to develop a online presentation application which has the webcam feature. I am using JMF for this purpose. I am creating this as an applet. The first time when the page loads and the user clicks the start button to start the video, the webcam starts and the video is displayed in a small area of the applet.
The left side of the applet displays the images. When the user clicks the next button, the next image from the vector is displayed and the image label displays the image number as 2.
The problem is that, if the user clicks next button , the video image from the webcam gets resized. It scales itself in the horizontal direction. I have no clue as to why is this happeneing. Is this something due to the layout problem or JMF ?
Any help in this matter will be highly appreciated.
Regards,
SharadI guess its because you are having a BorderLayout. If with a borderlayout, components added will strech both ways (horizontally and vertically) but you seem to say that the video image strechs only horizontally, maybe components added to NORTH or SOUTH of a borderlayout would do that.
Anyhow, try to set the layout to FlowLayout -
Hy!
I have a faculty project in wich I
have to acquire image from a webcam in Labwindows
8.1 and to take a picture and save it in a file and to display it.I managed to acquire
image from the webcam using the WIA automation activex controll but I
haven't been able to take a picture and save it and display it .So i ask of you to
post a tutorial or something that would help me to take a picture and save it and display it using the WIA automation activex controll in
LabWindows.
OS: Windows XP Professional X86
Please help me!!Unfortunetly I do not have any experience with Activex.This is one of the codes I tried so far:#include "wiaaut.h"
#include <cvirte.h>
#include <userint.h>
#include "camm.h"
static int panelHandle;
int cid,eroare;
CAObjHandle objh;
WIAObj_IImageFile result;
ERRORINFO eror;
int main (int argc, char *argv[])
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "camm.uir", PANEL)) < 0)
return -1;
DisplayPanel (panelHandle);
RunUserInterface ();
DiscardPanel (panelHandle);
return 0;
int CVICALLBACK OkCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
switch (event)
case EVENT_COMMIT:
WIA_NewIVideoPreview(panelHandle,"Video",45,45,&cid,&eroare);
GetObjHandleFromActiveXCtrl(panelHandle,cid,&objh) ;
break;
return 0;
int CVICALLBACK QuitCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
switch (event)
case EVENT_COMMIT:
QuitUserInterface (0);
break;
return 0;
int CVICALLBACK pozaCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
switch (event)
case EVENT_COMMIT:
WIA_NewICommonDialog(panelHandle,"poza",45,400,&cid,&eroare);
WIA_ICommonDialogShowAcquireImage(objh,&eror,2,1,131072,"{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}",VTRUE,VTRUE,VTRUE,&result);
break;
return 0;
Maybe you are looking for
-
o.k. So, I've been tinkering with several "self help" fixes for several days now with no positive results. I'll explain my initial problems and then end with my most current situation. In hopes that someone out there will have a good suggestion or
-
Hello Forum, We have a busy system, and the developers have fallen in love with temporary tables. Too much love.... I can get a snapshot of tables in tempDB, but I would like to track which procs are causing the load in the tempDB. I think I can samp
-
3 different iTunes libraries on one Apple TV
Is there any way possible that I can be signed in to ONE iTunes store account on my 2nd generation Apple TV to rent movies and tv shows, then see my family's mac's and pc's? I have a mac. Then there are two other computers in my house all with differ
-
Ntdll.dll application crashes
I have win 7 enterprise 64 bit there is a program called IBM SPSS keep crashing when locking the maching and loging back in the message says : IBM spss has stopped working event viewer : Faulting application name: stats.exe, version: 20.0.0.0, time
-
Chinese Charactor sorting in List using Comparator and Collator
I've used Collator.sort method with Locale.TRADITIONAL_CHINESE Locale to sort an ArrayList which contains a list of Chinese charactor. But it seems that the ordering is not based on stroke. Here is the coding for compare methods whose class implement