DMA Error in Acquisition of Image from 1473R

Hiii...
I am using Frame Grabber NI PCIe-1473R to acquire images from a dragster camera over CamLink interface. I am using “1-Tap 10-Bit Camera with Frame Trigger” example code to acquire images. When I am running the above example code to acquire the images sometimes I am getting blurred images & most of the times I am getting timeout error for DMA FIFO. I have not made any changes in the code.
I am attaching the snapshots of errors & the camera file (for Awaiba Dragster 2x 2k_9_8_14). Please have a look on the scenario & suggest changes to acquire the images properly.
Attachments:
Error 1.png ‏85 KB
Error 2.png ‏623 KB

Please suggest me any document or tutorial for programming & configuration of other paramters of NI PCIe-1473R

Similar Messages

  • Error While loading a image from database

    Purpose
    Error While loading the Image from the database
    ORA-06502: PL/SQL : numeric or value error:Character string buffer too small
    ORA-06512: at "Sys.HTP" ,line 1480
    Requirement:
    I am developing the web pages using PSP(Pl/sql Serverpages) . I have a requirement to show a image in the webpage. I got the following procedures from the oracle website.
    I have created the following table to store the images
    create table DEMO
    ID INTEGER not null,
    THEBLOB BLOB
    And I also uploaded the Images. Now I am try to get a image from the table using the following procedure .But I am getting the error message line 25( htp.prn( utl_raw.cast_to_varchar2( l_raw ) );) .at it throws the following error messages
    ORA-06502: PL/SQL : numeric or value error:Character string buffer too small
    ORA-06512: at "Sys.HTP" ,line 1480
    Procedure that I used to get the image
    create or replace package body image_get
    as
    procedure gif( p_id in demo.id%type )
    is
    l_lob blob;
    l_amt number default 30;
    l_off number default 1;
    l_raw raw(4096);
    begin
    select theBlob into l_lob
    from demo
    where id = p_id;
    -- make sure to change this for your type!
    owa_util.mime_header( 'image/gif' );
    begin
    loop
    dbms_lob.read( l_lob, l_amt, l_off, l_raw );
    -- it is vital to use htp.PRN to avoid
    -- spurious line feeds getting added to your
    -- document
    htp.prn( utl_raw.cast_to_varchar2( l_raw ) );
    l_off := l_off+l_amt;
    l_amt := 4096;
    end loop;
    exception
    when no_data_found then
    NULL;
    end;
    end;
    end;
    What I have to do to correct this problem. This demo procedure and table that I am downloaded from oracle. Some where I made a mistake. any help??
    Thanks,
    Nats

    Hi Satish,
    I have set the raw value as 3600 but still its gives the same error only. When I debug the procedure its throwing the error stack in
    SYS.htp.prn procedure of the following line of code
    if (rows_in < pack_after) then
    while ((len - loc) >= HTBUF_LEN)
    loop
    rows_in := rows_in + 1;
    htbuf(rows_in) := substr(cbuf, loc + 1, HTBUF_LEN);
    loc := loc + HTBUF_LEN;
    end loop;
    if (loc < len)
    then
    rows_in := rows_in + 1;
    htbuf(rows_in) := substr(cbuf, loc + 1);
    end if;
    return;
    end if;
    Its a system procedure. I don't no how to proceed .. I am really stucked on this....is their any other method to take picture from the database and displayed in the web page.....???? any idea..../suggesstion??
    Thanks for your help!!!.

  • Error message when donloading images from camera....?!?!?

    I have been trying to import images from my Canon Rebel digital camera and am having some issues. I was having trouble with iPhoto which is why I purchased this great program. At first, the images were downloading fast and furious with Aperture but now I am having some of the same issues that I was having with iPhoto. It is taking forever and a day to import my RAW images and now I am getting an error message with almost all of my photos. It stalls out on them (and the red light stops flashing on my camera as if they aren't communicating) and then I get the message that there was "a problem downloading that image" and this error code: (ICA download error -609).
    This is extremely frustrating!! HELP!
    iMac   Mac OS X (10.4.6)  
    iMac   Mac OS X (10.4.6)  

    You're loading straight off the camera?
    Be sure the camera isn't shutting itself off in the middle of the transfer. It may auto-turn-off after a minute.
    I'd really suggest you use a card reader. You can get a USB2 CF reader which will be 10x faster than direct camera download for like $20. I can't fathom why anyone would use direct-from-camera in lieu of a reader, unless they were doing tethered shooting.

  • Error #2148 when loading image from ByteArray (not network or file)

    Hi!
    When I try to access bitmap data of Image loaded from ByteArray, I receive the following error:
    Error #2148: SWF file file:///C|/blablabla..../MyFlash.swf cannot access local resource file:///C|/blablabla..../MyFlash.swf/[[DYNAMIC]]/2. Only local-with-filesystem and trusted local SWF files may access local resources.
    I'm on Flash, not on AIR. And ByteArray contains PNG data which I prepare myself
    I tried to do it with Image.load and loader.loadBytes - the error is the same. I tried to use Flex SDK 3.4, 3.5 & 3.6 - nothing helps.
    When I add this image to my stage, it is displayed absolutely OK, but I still can't access bitmapData of this image - always got the same error.
    Flash Player 10
    Here are the samples of my code:
              public function onLoadComplete(event:Event):void
                var loader:LoaderInfo = event.target as LoaderInfo;
                var bmp:Bitmap = loader.loader.content as Bitmap; <-- here I received the error
                var bmpDat:BitmapData = bmp.bitmapData;
                this.bitmapData.copyPixels(bmpDat,new Rectangle(0,0,width,height), new Point(0,0));
                var loader:Loader = new Loader();
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
                loader.loadBytes(byteArray);
    And another try
           var image: Image = new Image()
           this.addChild(image);
           image.addEventListener(FlexEvent.UPDATE_COMPLETE, onCompleteLoad2 );
          image.load(byteArray);
          public function onCompleteLoad2 (e:flash.events.Event):void
                     var image:Image=e.target as Image;
                     var bitmapData:BitmapData;
                     bitmapData=new BitmapData(image.width,image.height,true,0);             
                     bitmapData.draw(image); <-- here I received the error, while image is correctly added to the stage and displayed
    What's wrong? It seems, the image loaded from byteArray is treated as local resource. How can I overcome it inside the code? Because this .swf is
    run on different computers and I can't just add a flash security exception on every of them....
    Please, help I spent, maybe 20 hours and still can't find the solution

    I had the same problem, except I was reading in the image from the local disk using FileReference.  Anyway, my issue was resolved by using the
    -use-network=false option on the command line of my compiler (I do all my development in the shell using 'vi' to edit and mxmlc to compile).
    Ttry "-use-network=false" and see if that helps...
    ...bob...

  • GetBlob Error During fetching of Images from Oracle 10g

    Dear Sir,
    By using getBlob Function ,i am getting following error:"Unsupportable action has performed".
    I am using oracle 10g.I am using java code to retrieve image from Oracle 10g.
    So plz help me by giving full code with explaination.
    Thankyou.
    Yours Obedient
    Dipesh Kumar

    I seriously doubt Oracle would write error messages with such atrocious English.
    So it's almost certainly an error from either your own code or code you're calling in some library or part of the application you're not mentioning that noone here except you has knowledge of.
    Ergo, we're not going to be able to help you unless you provide a lot more information.
    And no, we're not going to write your code for you.

  • Image Date error on importing TIFF images from Disk

    I have thousands of high quality (~100 Mb each) images in 20 folders on a 1 Tb hard drive. I have been using Bridge to manage the images, adding some metadata such as keywords and copyright data. I am considering importing all these images into Aperture and using it as the primary image management tool.
    But I am concerned about an apparent bug in the way Aperture handles the "image date and time".
    In Bridge (and GraphicConverter), the "image date" field is correct, directly from my CFV digital back on the camera and inline with the time of day the shot was taken (e.g. sunrise image at 6am). When I import the image into Aperture, the time gets shifted by 14 hours.
    For example, an image in Bridge that correctly shows Date Created as 10/05/2009 7:36am gets distorted to 10/05/2009 9:36pm, exactly 14 hours later than the correct time. It was taken at 7:30 in the morning but, in Aperture, looks like it was taken in the late evening. It does not look like a time zone issue as the image was taken in the same time zone as my Mac Pro is set to.
    I have tried deleting the masters and re-importing them with GMT +2 and GMT -12 in the two time zone adjustment fields. This gets the right time into the Image Date field but then the image has the wrong time zone data in the "Camera Time Zone" and "Picture Time Zone" fields.
    I have tried running MetaData > Update Date and Time (with Master files ON) but it comes back with an error "no master files were adjusted ... because they have a format that does not permit modification".
    I have tried running MetaData > Update Date and Time (with Master files OFF). It appears to work but I assume that the underlying file in the Aperture library still has the incorrect time.
    Have others faced this problem? Is there a solution? Is it a known bug that Apple might fix one day?
    Regards
    Peter

    I am seeing a very similar problem when importing TIFF files back to Aperture.
    This is what I do and what I see:
    1. I import RAW images from my camera into Aperture. They show the correct date and time.
    2. I open an RAW image in Photoshop (CS4) directly from the finder. The image inside Photoshop (file/info) shows the correct date and time.
    3. After editing I save my image as 16bit TIFF and it still shows correct date and time.
    4. I import the new TIFF back into Aperture. The time is shifted back 15 hrs!
    I can then go in and Metadata/Update Date and Time (no masters) and it works well, but it is a pain to do on each image I process.
    In all cases camera and image timezone is set to US Pacific as it should be.
    To me this seems like Aperture is somehow miss-interpreting the timezone when reimporting TIFFs.
    I have not tried importing JPEGs or PSDs back but I will and will report back...

  • Error retrieving newly captured image from a camera.

    Hello Everyone,
    I am developing a user<->digital camera interaction application and I have a
    problem with accessing newly captured picture. The thing is I am trying to save
    the picture directly to the hard disk(this is possible with the camera I am using).
    So normally, as stated in the camera PTP specification, the process can be described
    in the following steps:
    1). PTP command 'capture' - is send successfully to the camera( the camera captures).
    2). Event 'RequestObjectTransfer' of ObjectHandle 0x12345678 - is received from the
    camera and processed by my application.
    3). GetObjectInfo (of ObjectHandle (0x12345678) ) command should be send to the camera.
    4). ObjectInfo - received from the camera.
    5). GetObject (of ObjectHandle (0x12345678) command send to camera.
    6). Object of ObjectHandle (0x12345678) received from the camera.
    7). Event TransferReady.
    Everything works fine until I try to ask for the object's info:
    - (CFDictionaryRef*) copyObjectPropertyDictionary
    OSErr err;
    ICACopyObjectPropertyDictionaryPB pb = {};
    NSDictionary* dict;
    pb.theDict = (CFDictionaryRef *)&dict;
    pb.object = 0x12345678;
    err = ICACopyObjectPropertyDictionary(&pb, NULL); //(**)
    if (noErr != err)
    NSLog(@"Error retrieving object info!");
    else
    return dict; // CFDictionaryRef *
    return NULL;
    The call (**) in the code above results in "err == -9905(kICAInvalidObjectErr)", so can
    anybody tell me where my mistake is because there is obviously one (btw I
    wrote the same application for Windows and the id 0x12345678 is recognized there.)

    It is an OS X application, the GUI is already done(not all of the controlls are functional,
    there are really a lot of them as the camera tend to be 'semi-professional' == 'a lot of
    settings'). Actually, what my application can do at this point is read/write settings
    from/to the camera, can 'sense' some event notifications, can capture image when the
    camera is on external mode(no memory card) and the images are processed to the
    'Current User'/Pitures folder and finally can look pretty sexy
    The method that gave me headaches for a week or so was the common ICADownloaFile
    it was not recognized by this particular camera as was not the 'copyObjectPropertyDictionary'
    posted above. Instead I wrote two PTPPassThrough methods which are now accepted by the
    Cam.

  • "input/output error' when making disc image from DVD

    I've had problems installing Logic, and a Pro Apps Genius at Applecare suggested I try making an image of the problematic DVD (Audio Content 1) and then trying an install that way.
    While I can make an image of the Install disc to my desktop fine, the Audio Content 1 disc reports an "input/output error".
    This means I'm unable to copy the disc and then successfully install my Logic Studio.
    Any ideas?

    Thanks for your answer.
    Yes, I thought that might be the case - but I'd taken my Mac and Logic disks to a Genius bar, and the 'Genius' had said he'd fixed the issue. I just wish he'd explained what he did and why he didn't replace the faulty disk(s)!
    But is there any way around having the claim a disk, now I'm living abroad and my 'warrantee' has run out? It's going to be a pain in the fundament trying to claim a replacement set.

  • Error while getting  image from database in SUP using ios?

    Hi All,
      Im developing native iOS application using sup 2.1.3 . Im getting error While retrieving  image from SUP database. Here i'm trying to get image from database and show in imageView.can any one help me how to fix this issue?
    In database image datatype is  'LONG Binary' .
    My table Schema:
    CREATE TABLE dba.ImagesTable (
    RowID INT NOT NULL,
    ImageName VARCHAR(20) NOT NULL,
    PhotoData LONG BINARY NOT NULL,
    IN SYSTEM
    ALTER TABLE dba.ImagesTable
      ADD CONSTRAINT ASA137 PRIMARY KEY CLUSTERED (RowID)
    ALTER TABLE dba.ImagesTable
      ADD CONSTRAINT ASA138 UNIQUE NONCLUSTERED (RowID)
    in Xcode:
                [SUP107SUP107DB synchronize];
                SUP107ImagesTable *imgTable =[[SUP107ImagesTable alloc]init];
                SUP107ImagesTableList *list =[SUP107ImagesTable findAll];
                SUP107ImagesTable * oneRecord =[list objectAtIndex:0];
                NSLog(@"rowId:%d---imageName:%@---photoData:%@---photoLenght:%d",oneRecord.rowID,oneRecord.imageName,oneRecord.photoData,oneRecord.photoDataLength);
                NSData *tempData =[[NSData alloc]init];
                SUPBigBinary *responseBinaryData = (SUPBigBinary *)oneRecord.photoData.value;
                @try {
                    [responseBinaryData openForWrite:[oneRecord.photoData length]];
                    [responseBinaryData write:tempData];
                @catch (NSException *exception) {
                    NSLog(@"exception: %@",[exception description]);
                UIImageView *imgView =[[UIImageView alloc] initWithFrame:CGRectMake(50,50,100,100)];
                [self.window addSubview:imgView];
                UIImage * tempImage =[UIImage imageWithData:tempData];
                imgView.image = tempImage;
                [responseBinaryData close];
    Error Log:
    2014-04-02 18:42:15.150 SUP102[2873:70b] rowId:1---imageName:Apple---photoData:SUPBigBinary: column=c pending=1 allow_pending_state=1 table=sup107_1_0_imagestable mbo=0x0 key=(null) ---photoLenght:90656
    Printing description of responseBinaryData:
    <OS_dispatch_data: data[0xc891b40] = { leaf, size = 90656, buf = 0x1213a000 }>
    2014-04-02 18:42:33.304 SUP102[2873:70b] -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.305 SUP102[2873:70b] exception: -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.305 SUP102[2873:70b] -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.306 SUP102[2873:70b] [ERROR] [AppDelegate.m:497] NSInvalidArgumentException: -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40

    This thread talks about uploading image to SAP from a IOS device,Sending Image to SAP via iOS Native app (SUP 2.1.3)
    Midhun VP

  • Photo images from dig. cam [one is error and other won't open] questions

    My wife inserted the sd card in the card reader and copied about 70 photo image files to the Mac. The camera that took all the 70 photos was a Panasonic DMC-LZ5 but I don't think the camera model matters much here.
    For the first time, 2 of the many images seem to be corrupt. Mac X reports one photo image has an error while trying to open and reports the second image won't open.
    My main concern is whether or not to just delete the two error/corrupt jpg images. My other main concern is that I don't want to keep the two images if it could affect or corrupt my hd or Mac system in some way.
    I normally just trash corrupted files; however, in this case I went ahead and attempted to open both of the 2 troubled files myself later and they both opened up in Preview and didn't report any error or corruption. However, one of the jpg images defintely is corrupt when viewing it as the bottom of the image is definitely messed up. However, the other image now opens perfectly and looks fine to the eye as if nothing is wrong with it.
    Here is a link to the one photo image that isn't quite right [note the obvious distortion at bottom of image]. Link is http://mysite.verizon.net/vzenvo78/question595.jpg
    Further very relevant information: The SanDisk sd card that all the 70 images were on is a 1 gig card and the sd card seems to be a total loss. The sd card can't be initialized/formatted by disk utility and furthermore the sd card is no longer recognized by the Panasonic camera - the Panasonic camera won't even preview the images off the card or allow me to format the card even from the camera.

    Hello,
    I see what you are talking about. I just discovered this same exact problem on a friends G5 after he uploaded pics from his Leica.
    This is what I did: I ran Disk Utility from the system restore disc to verify and repair the drive. DU reported Volume Bitmap problems. DU was able to repair the disc. Next, I created a new user account and tried uploading the images from the camera to the G5 and it worked just fine. The images loaded like they should.
    I also reinstalled the drivers that came with the camera.
    Delete any files that your Mac reports as a problem. It's just not worth leaving them on the drive.
    So...... run Disk Utility from your system restore disc. If it reports errors, hopefully DU can repair them. If not, one option is to get DiskWarrior here:
    www.alsoft.com or TechToolPro4 here: www.micromat.com
    One other idea is how old is the card?
    Next idea is to create a new user acccount: System Prefs/Accounts. Try using that account to upload the same images. See if they upload as they should. If they do, then the issue isn't system wide, it's just in the other user account.
    Remember to always back up your images/audio/data often as you never know when you might need to do either an Archive or Erase and Reinstall.
    Carolyn

  • Disk Utility Image from Disk (whole disk) Error -39...

    Hi - I've been trying to make a compressed/encrypted image of my primary hard drive without success. Using Disk Utility so I can have an image I can mount to retrieve files off an external HD when necessary. Booting from external firewire drive (partition 1), and attempting to clone/backup image from Primary internal boot drive to external firewire drive (partition 2). Have also tried the following: setting the save-to location to the second internal hard drive; doing it uncompressed / unencrypted. I have run Repair, Permissions, Disk Warrior and no issues with the file system/drive I'm trying to image.
    The only references I've seen to error 39 is End of File (EoF) corruption or error. Since the drive/files check-out, Disk Utility must be creating an error somehow. It always happens when the backup is totally complete, and appears it's finishing up the file.
    Any thoughts? Thank you!!

    I'm having the same problem on a Power Mac G4 with OS 10.4.6 using disk utility.
    I've tried this on a 400gig seagate in a raid array
    on a 120 gig seagate
    from the raid array to the 120 gig
    from a 120 gig to a second 120 gig
    from the disk and it crashed and sent an error message to apple
    I have plenty of space
    I've seen this on the discussion forums so I know others are having this problem.
    I'm writing to you pro's in hopes that you may have some suggestions.
    I'm just trying to create backup images of my primary hard drive.
    I've been in the Mac family since the early 80's... I've found other mac users to be very helpful:)
    An ideas??

  • Loader will load images from another server, but then we get error on Bitmap operation

    I'm developing an app that currently is using Loader to get images from another server.  This shouldn't currently work since we are still waiting for the owner of that server to put a crossdomain file in place.  However, it does work -- sort of .
    Loader can load the images fine, without an error.  But then the app has a feature in which we are making a larger duplicate of the image to display in a sidebar, we do this in this manner:
    var myBitmap:Bitmap = Bitmap(loader.content);
    and when this runs we get a Flash player security error 2122, sandbox violation.
    So while I'm hoping all this will fix itself when the crossdomain.xml file is put in place, I'm confused as to why we only get the sandbox error when we make a Bitmap from the image, and not when we initially try to retrieve the image.
    (Incidentally: is there a better way to make a "copy" of an image loaded by a Loader, and then change its width and height for simultaneous display in another part of the stage?  I don't need to change its actual dimensions -- I just need to change its display width and height.)
    Thanks!

    The sandbox allows viewing, not editing from another server without a crossdomain.
    So, when you try to load it up, it loads it, but "read-only" and gives you an error when you try to "edit" it by making a new Bitmap out of it.
    This should resolve itself once that crossdomain is in place.
    ||EDIT||
    I just realized I should clarify my statement a little more.
    When you load images from another server without a crossdomain, it allows the load for display only.  When you try to load data, it will fail.  This is because, XML data, or some other type of data is editable by default, and images are only viewable by default.  So, the image fails when you try to convert it into an editable form.

  • Errors in code that captures images from webcam

    Here is the code
    import javax.swing.*;
    import javax.swing.border.*;
    import java.io.*;
    import javax.media.*;
    import javax.media.datasink.*;
    import javax.media.format.*;
    import javax.media.protocol.*;
    import javax.media.util.*;
    import javax.media.control.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import com.sun.image.codec.jpeg.*;
    // import com.sun.media.vfw.VFWCapture; // JMF 2.1.1c version
    import com.sun.media.protocol.vfw.VFWCapture; // JMF 2.1.1e version
    public class JWebCam extends JFrame
    implements WindowListener, ComponentListener
    protected final static int MIN_WIDTH = 320;
    protected final static int MIN_HEIGHT = 240;
    protected static int shotCounter = 1;
    protected JLabel statusBar = null;
    protected JPanel visualContainer = null;
    protected Component visualComponent = null;
    protected JToolBar toolbar = null;
    protected MyToolBarAction formatButton = null;
    protected MyToolBarAction captureButton = null;
    protected Player player = null;
    protected CaptureDeviceInfo webCamDeviceInfo = null;
    protected MediaLocator ml = null;
    protected Dimension imageSize = null;
    protected FormatControl formatControl = null;
    protected VideoFormat currentFormat = null;
    protected Format[] videoFormats = null;
    protected MyVideoFormat[] myFormatList = null;
    protected boolean initialised = false;
    * Constructor
    public JWebCam ( String frameTitle )
    super ( frameTitle );
    try
    UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    catch ( Exception cnfe )
    System.out.println ("Note : Cannot load look and feel settings");
    setSize ( 320, 260 ); // default size...
    addWindowListener ( this );
    addComponentListener ( this );
    getContentPane().setLayout ( new BorderLayout() );
    visualContainer = new JPanel();
    visualContainer.setLayout ( new BorderLayout() );
    getContentPane().add ( visualContainer, BorderLayout.CENTER );
    statusBar = new JLabel ("");
    statusBar.setBorder ( new EtchedBorder() );
    getContentPane().add ( statusBar, BorderLayout.SOUTH );
    * Initialise
    * @returns true if web cam is detected
    public boolean initialise ( )
    throws Exception
    return ( initialise ( autoDetect() ) );
    * Initialise
    * @params _deviceInfo, specific web cam device if not autodetected
    * @returns true if web cam is detected
    public boolean initialise ( CaptureDeviceInfo _deviceInfo )
    throws Exception
    statusBar.setText ( "Initialising...");
    webCamDeviceInfo = _deviceInfo;
    if ( webCamDeviceInfo != null )
    statusBar.setText ( "Connecting to : " + webCamDeviceInfo.getName() );
    try
    setUpToolBar();
    getContentPane().add ( toolbar, BorderLayout.NORTH );
    ml = webCamDeviceInfo.getLocator();
    if ( ml != null )
    player = Manager.createRealizedPlayer ( ml );
    if ( player != null )
    player.start();
    formatControl = (FormatControl)player.getControl ( "javax.media.control.FormatControl" );
    videoFormats = webCamDeviceInfo.getFormats();
    visualComponent = player.getVisualComponent();
    if ( visualComponent != null )
    visualContainer.add ( visualComponent, BorderLayout.CENTER );
    myFormatList = new MyVideoFormat[videoFormats.length];
    for ( int i=0; i<videoFormats.length; i++ )
    myFormatList = new MyVideoFormat ( (VideoFormat)videoFormats );
    Format currFormat = formatControl.getFormat();
    if ( currFormat instanceof VideoFormat )
    currentFormat = (VideoFormat)currFormat;
    imageSize = currentFormat.getSize();
    visualContainer.setPreferredSize ( imageSize );
    setSize ( imageSize.width, imageSize.height + statusBar.getHeight() + toolbar.getHeight() );
    else
    System.err.println ("Error : Cannot get current video format");
    invalidate();
    pack();
    return ( true );
    else
    System.err.println ("Error : Could not get visual component");
    return ( false );
    else
    System.err.println ("Error : Cannot create player");
    statusBar.setText ( "Cannot create player" );
    return ( false );
    else
    System.err.println ("Error : No MediaLocator for " + webCamDeviceInfo.getName() );
    statusBar.setText ( "No Media Locator for : " + webCamDeviceInfo.getName() );
    return ( false );
    catch ( IOException ioEx )
    statusBar.setText ( "Connecting to : " + webCamDeviceInfo.getName() );
    return ( false );
    catch ( NoPlayerException npex )
    statusBar.setText ("Cannot create player");
    return ( false );
    catch ( CannotRealizeException nre )
    statusBar.setText ( "Cannot realize player");
    return ( false );
    else
    return ( false );
    * Dynamically create menu items
    * @returns the device info object if found, null otherwise
    public void setFormat ( VideoFormat selectedFormat )
    if ( formatControl != null )
    player.stop();
    imageSize = selectedFormat.getSize();
    formatControl.setFormat ( selectedFormat );
    player.start();
    statusBar.setText ( "Format : " + selectedFormat );
    currentFormat = selectedFormat;
    visualContainer.setPreferredSize ( currentFormat.getSize() );
    setSize ( imageSize.width, imageSize.height + statusBar.getHeight() + toolbar.getHeight() );
    else
    System.out.println ("Visual component not an instance of FormatControl");
    statusBar.setText ( "Visual component cannot change format" );
    public VideoFormat getFormat ( )
    return ( currentFormat );
    protected void setUpToolBar ( )
    toolbar = new JToolBar();
    // Note : If you supply the 16 x 16 bitmaps then you can replace
    // the commented line in the MyToolBarAction constructor
    formatButton = new MyToolBarAction ( "Resolution", "BtnFormat.jpg" );
    captureButton = new MyToolBarAction ( "Capture", "BtnCapture.jpg" );
    toolbar.add ( formatButton );
    toolbar.add ( captureButton );
    getContentPane().add ( toolbar, BorderLayout.NORTH );
    protected void toolbarHandler ( MyToolBarAction actionBtn )
    if ( actionBtn == formatButton )
    Object selected = JOptionPane.showInputDialog (this,
    "Select Video format",
    "Capture format selection",
    JOptionPane.INFORMATION_MESSAGE,
    null, // Icon icon,
    myFormatList, // videoFormats,
    currentFormat );
    if ( selected != null )
    setFormat ( ((MyVideoFormat)selected).format );
    else if ( actionBtn == captureButton )
    Image photo = grabFrameImage ( );
    if ( photo != null )
    MySnapshot snapshot = new MySnapshot ( photo, new Dimension ( imageSize ) );
    else
    System.err.println ("Error : Could not grab frame");
    * autoDetects the first web camera in the system
    * searches for video for windows ( vfw ) capture devices
    * @returns the device info object if found, null otherwise
    public CaptureDeviceInfo autoDetect ( )
    Vector list = CaptureDeviceManager.getDeviceList ( null );
    CaptureDeviceInfo devInfo = null;
    if ( list != null )
    String name;
    for ( int i=0; i<list.size(); i++ )
    devInfo = (CaptureDeviceInfo)list.elementAt ( i );
    name = devInfo.getName();
    if ( name.startsWith ("vfw:") )
    break;
    if ( devInfo != null && devInfo.getName().startsWith("vfw:") )
    return ( devInfo );
    else
    for ( int i = 0; i < 10; i++ )
    try
    name = VFWCapture.capGetDriverDescriptionName ( i );
    if (name != null && name.length() > 1)
    devInfo = com.sun.media.protocol.vfw.VFWSourceStream.autoDetect ( i );
    if ( devInfo != null )
    return ( devInfo );
    catch ( Exception ioEx )
    // ignore errors detecting device
    statusBar.setText ( "AutoDetect failed : " + ioEx.getMessage() );
    return ( null );
    else
    return ( null );
    * deviceInfo
    * @note outputs text information
    public void deviceInfo ( )
    if ( webCamDeviceInfo != null )
    Format[] formats = webCamDeviceInfo.getFormats();
    if ( ( formats != null ) && ( formats.length > 0 ) )
    for ( int i=0; i<formats.length; i++ )
    Format[] aFormat = formats;
    if ( aFormat[i] instanceof VideoFormat )
    Dimension dim = ((VideoFormat)aFormat).getSize();
    // System.out.println ("Video Format " + i + " : " + formats.getEncoding() + ", " + dim.width + " x " + dim.height );
    else
    System.out.println ("Error : No web cam detected");
    * grabs a frame's buffer from the web cam / device
    * @returns A frames buffer
    public Buffer grabFrameBuffer ( )
    if ( player != null )
    FrameGrabbingControl fgc = (FrameGrabbingControl)player.getControl ( "javax.media.control.FrameGrabbingControl" );
    if ( fgc != null )
    return ( fgc.grabFrame() );
    else
    System.err.println ("Error : FrameGrabbingControl is null");
    return ( null );
    else
    System.err.println ("Error : Player is null");
    return ( null );
    * grabs a frame's buffer, as an image, from the web cam / device
    * @returns A frames buffer as an image
    public Image grabFrameImage ( )
    Buffer buffer = grabFrameBuffer();
    if ( buffer != null )
    // Convert it to an image
    BufferToImage btoi = new BufferToImage ( (VideoFormat)buffer.getFormat() );
    if ( btoi != null )
    Image image = btoi.createImage ( buffer );
    if ( image != null )
    return ( image );
    else
    System.err.println ("Error : BufferToImage cannot convert buffer");
    return ( null );
    else
    System.err.println ("Error : cannot create BufferToImage instance");
    return ( null );
    else
    System.out.println ("Error : Buffer grabbed is null");
    return ( null );
    * Closes and cleans up the player
    public void playerClose ( )
    if ( player != null )
    player.close();
    player.deallocate();
    player = null;
    public void windowClosing ( WindowEvent e )
    playerClose();
    System.exit ( 1 );
    public void componentResized ( ComponentEvent e )
    Dimension dim = getSize();
    boolean mustResize = false;
    if ( dim.width < MIN_WIDTH )
    dim.width = MIN_WIDTH;
    mustResize = true;
    if ( dim.height < MIN_HEIGHT )
    dim.height = MIN_HEIGHT;
    mustResize = true;
    if ( mustResize )
    setSize ( dim );
    public void windowActivated ( WindowEvent e ) { }
    public void windowClosed ( WindowEvent e ) { }
    public void windowDeactivated ( WindowEvent e ) { }
    public void windowDeiconified ( WindowEvent e ) { }
    public void windowIconified ( WindowEvent e ) { }
    public void windowOpened ( WindowEvent e ) { }
    public void componentHidden(ComponentEvent e) { }
    public void componentMoved(ComponentEvent e) { }
    public void componentShown(ComponentEvent e) { }
    protected void finalize ( ) throws Throwable
    playerClose();
    super.finalize();
    class MyToolBarAction extends AbstractAction
    public MyToolBarAction ( String name, String imagefile )
    // Note : Use version this if you supply your own toolbar icons
    // super ( name, new ImageIcon ( imagefile ) );
    super ( name );
    public void actionPerformed ( ActionEvent event )
    toolbarHandler ( this );
    class MyVideoFormat
    public VideoFormat format;
    public MyVideoFormat ( VideoFormat _format )
    format = _format;
    public String toString ( )
    Dimension dim = format.getSize();
    return ( format.getEncoding() + " [ " + dim.width + " x " + dim.height + " ]" );
    class MySnapshot extends JFrame
    protected Image photo = null;
    protected int shotNumber;
    public MySnapshot ( Image grabbedFrame, Dimension imageSize )
    super ( );
    shotNumber = shotCounter++;
    setTitle ( "Photo" + shotNumber );
    photo = grabbedFrame;
    setDefaultCloseOperation ( WindowConstants.DISPOSE_ON_CLOSE );
    int imageHeight = photo.getWidth ( this );
    int imageWidth = photo.getHeight ( this );
    setSize ( imageSize.width, imageSize.height );
    final FileDialog saveDialog = new FileDialog ( this, "Save JPEG", FileDialog.SAVE );
    final JFrame thisCopy = this;
    saveDialog.setFile ( "Photo" + shotNumber );
    addWindowListener ( new WindowAdapter()
    public void windowClosing ( WindowEvent e )
    saveDialog.show();
    String filename = saveDialog.getFile();
    if ( filename != null )
    if ( saveJPEG ( filename ) )
    JOptionPane.showMessageDialog ( thisCopy, "Saved " + filename );
    setVisible ( false );
    dispose();
    else
    JOptionPane.showMessageDialog ( thisCopy, "Error saving " + filename );
    else
    setVisible ( false );
    dispose();
    setVisible ( true );
    public void paint ( Graphics g )
    g.drawImage ( photo, 0, 0, getWidth(), getHeight(), this );
    * Saves an image as a JPEG
    * @params the image to save
    * @params the filename to save the image as
    public boolean saveJPEG ( String filename )
    boolean saved = false;
    BufferedImage bi = new BufferedImage ( photo.getWidth(null),
    photo.getHeight(null),
    BufferedImage.TYPE_INT_RGB );
    Graphics2D g2 = bi.createGraphics();
    g2.drawImage ( photo, null, null );
    FileOutputStream out = null;
    try
    out = new FileOutputStream ( filename );
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder ( out );
    JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam ( bi );
    param.setQuality ( 1.0f, false ); // 100% high quality setting, no compression
    encoder.setJPEGEncodeParam ( param );
    encoder.encode ( bi );
    out.close();
    saved = true;
    catch ( Exception ex )
    System.out.println ("Error saving JPEG : " + ex.getMessage() );
    return ( saved );
    } // of MySnapshot
    public static void main (String[] args )
    try
    JWebCam myWebCam = new JWebCam ( "TimeSlice Web Cam Capture" );
    myWebCam.setVisible ( true );
    if ( !myWebCam.initialise() )
    System.out.println ("Web Cam not detected / initialised");
    catch ( Exception ex )
    ex.printStackTrace();
    when I run it I get the following errors
    BufferToImage cannot convert buffer
    could not grab frame
    pls help

    Do you expect anyone to read this?
    http://forum.java.sun.com/help.jspa?sec=formatting
    By the way, you have a condition that makes it print those messages. Check why that condiiton isn't rue.

  • Recently bought cs6, downloading images from nikon d600 but error states i need latest camera raw update. Help?

    recently downloaded cs6 and tried to download images from d600. error states need latest camera raw update. How to go about this?

    You can find the direct download links here: https://helpx.adobe.com/x-productkb/multi/camera-raw-plug-in-installer.html
    Benjamin

  • When capturing images from a Nikon D600, they show in Bridge, but when clicked to load into CS6,an error message says that it is the wrong type of document, even jpeg files. This is a NEW frustration.

    When capturing images from a Nikon D600, they show in Bridge, but when clicked to load into CS6,an error message says that it is the wrong type of document, evne jpeg files. This is a NEW frustration.

    Nikon raw files would open up in Adobe Camera Raw and so should jpegs.
    If you select one in Bridge and give the command "Ctrl r" (Windows), what happens?
    Also what is the version of ACR in the title bar?
    Gene
    Note: unmark your question as "answered". the green balloon next to the subject shows it as "solved".

Maybe you are looking for