edu.udayton.udri.asset.webcam.uvc/src/edu/udayton/udri/asset/webcam/uvc/UVCWebcamAsset.java
private ImageMetadata createMetadata(final String captureReasonDescription)
    {
        final double widthDbl = m_Webcam.getViewSize().getWidth();
        final double heightDbl = m_Webcam.getViewSize().getHeight();
        final int width = (int) widthDbl;
        final int height = (int) heightDbl;
        final PixelResolution resolution = new PixelResolution(width, height);
        
        final Date date = new Date();
        final Long captureTime = date.getTime();
        
        final int id = 0;
        final Camera imager = new Camera(id, m_Webcam.getName(), CameraTypeEnum.UNKNOWN);

        final ImageCaptureReason captureReason = new ImageCaptureReason(ImageCaptureReasonEnum.MANUAL, 
                captureReasonDescription);
        
        final ImageMetadata meta = new ImageMetadata()
            .withColor(true)
            .withResolution(resolution)
            .withCaptureTime(captureTime)
            .withImageCaptureReason(captureReason)
            .withImager(imager);
        
        return meta;
    }
/**
     * Method to create the metedata that's required for the observation.
     * 
     * @param captureReasonDescription A string describing the capture reason
     * @return The ImageMetadata
     */
Method to create the metedata that's required for the observation.

@param captureReasonDescription A string describing the capture reason
@return The ImageMetadata
Method to create the metedata that ' s required for the observation . @param captureReasonDescription A string describing the capture reason @return The ImageMetadata
private ImageMetadata createMetadata(final String captureReasonDescription)
    {
        final double widthDbl = m_Webcam.getViewSize().getWidth();
        final double heightDbl = m_Webcam.getViewSize().getHeight();
        final int width = (int) widthDbl;
        final int height = (int) heightDbl;
        final PixelResolution resolution = new PixelResolution(width, height);
        final Date date = new Date();
        final Long captureTime = date.getTime();
        final int id = 0;
        final Camera imager = new Camera(id, m_Webcam.getName(), CameraTypeEnum.UNKNOWN);
        final ImageCaptureReason captureReason = new ImageCaptureReason(ImageCaptureReasonEnum.MANUAL, 
                captureReasonDescription);
        final ImageMetadata meta = new ImageMetadata()
            .withColor(true)
            .withResolution(resolution)
            .withCaptureTime(captureTime)
            .withImageCaptureReason(captureReason)
            .withImager(imager);
        return meta;
    }
private ImageMetadata createMetadata ( final String captureReasonDescription ) { final double widthDbl = m_Webcam . getViewSize ( ) . getWidth ( ) ; final double heightDbl = m_Webcam . getViewSize ( ) . getHeight ( ) ; final int width = ( int ) widthDbl ; final int height = ( int ) heightDbl ; final PixelResolution resolution = new PixelResolution ( width , height ) ; final Date date = new Date ( ) ; final Long captureTime = date . getTime ( ) ; final int id = 0 ; final Camera imager = new Camera ( id , m_Webcam . getName ( ) , CameraTypeEnum . UNKNOWN ) ; final ImageCaptureReason captureReason = new ImageCaptureReason ( ImageCaptureReasonEnum . MANUAL , captureReasonDescription ) ; final ImageMetadata meta = new ImageMetadata ( ) . withColor ( true ) . withResolution ( resolution ) . withCaptureTime ( captureTime ) . withImageCaptureReason ( captureReason ) . withImager ( imager ) ; return meta ; }
Method to create the metedata that's required for the observation.
Method to create the metedata that ' s required for the observation .