Functions
core/vidl/vidl_convert.cxx File Reference
#include "vidl_convert.h"
#include "vidl_frame.h"
#include "vidl_pixel_format.h"
#include "vidl_pixel_iterator.txx"
#include "vidl_color.h"
#include <vil/vil_convert.h>
#include <vil/vil_new.h>
#include <vil/vil_memory_chunk.h>
#include <vcl_cstring.h>
#include <vcl_cassert.h>
#include <vcl_memory.h>

Go to the source code of this file.

Functions

bool vidl_convert_frame (vidl_frame const &in_frame, vidl_frame &out_frame)
 Convert the pixel format of a frame.
vidl_frame_sptr vidl_convert_frame (const vidl_frame_sptr &in_frame, vidl_pixel_format format)
 Convert the pixel format of a frame.
vidl_frame_sptr vidl_convert_to_frame (const vil_image_view_base_sptr &image)
 Convert the image view to a frame.
vidl_frame_sptr vidl_convert_to_frame (const vil_image_view_base &image)
 Convert the image view to a frame.
bool vidl_convert_to_view (vidl_frame const &frame, vil_image_view_base &image, vidl_pixel_color require_color)
 convert the frame into an image view.
vil_image_view_base_sptr vidl_convert_wrap_in_view (vidl_frame const &frame)
 Wrap the frame buffer in an image view if supported.

Detailed Description

Author:
Matt Leotta
Date:
20 Jan 2006
    Modifications
     10 Jul.2008 - Antonio Garrido - Added conversions for RGB_24(P),MONO8 and YUYV_422
   

Definition in file vidl_convert.cxx.


Function Documentation

bool vidl_convert_frame ( vidl_frame const &  in_frame,
vidl_frame out_frame 
)

Convert the pixel format of a frame.

The in_frame->data() is converted from in_frame->pixel_format() to out_frame->pixel_format() and stored in out_frame->data()

Returns:
false if the output frame data is not the correct size.

Definition at line 470 of file vidl_convert.cxx.

vidl_frame_sptr vidl_convert_frame ( const vidl_frame_sptr in_frame,
vidl_pixel_format  format 
)

Convert the pixel format of a frame.

The convert in_frame to a format by allocating a new frame buffer

Definition at line 499 of file vidl_convert.cxx.

vidl_frame_sptr vidl_convert_to_frame ( const vil_image_view_base_sptr image)

Convert the image view to a frame.

Convert the image view smart pointer to a frame.

Will wrap the memory if possible, if not the image is converted to the closest vidl_pixel_format

Definition at line 521 of file vidl_convert.cxx.

vidl_frame_sptr vidl_convert_to_frame ( const vil_image_view_base image)

Convert the image view to a frame.

Will wrap the memory if possible, if not the image is converted to the closest vidl_pixel_format

Definition at line 532 of file vidl_convert.cxx.

bool vidl_convert_to_view ( vidl_frame const &  frame,
vil_image_view_base image,
vidl_pixel_color  require_color 
)

convert the frame into an image view.

Convert the frame into an image view.

possibly converts the pixel data type always create a deep copy of the data

Definition at line 607 of file vidl_convert.cxx.

vil_image_view_base_sptr vidl_convert_wrap_in_view ( vidl_frame const &  frame)

Wrap the frame buffer in an image view if supported.

Returns a null pointer if not possible

Definition at line 743 of file vidl_convert.cxx.