OpenCV 2.4.2

org.opencv.highgui
Class Highgui

java.lang.Object
  extended by org.opencv.highgui.Highgui

public class Highgui
extends java.lang.Object


Field Summary
static int CV_CAP_ANDROID
           
static int CV_CAP_ANDROID_ANTIBANDING_50HZ
           
static int CV_CAP_ANDROID_ANTIBANDING_60HZ
           
static int CV_CAP_ANDROID_ANTIBANDING_AUTO
           
static int CV_CAP_ANDROID_ANTIBANDING_OFF
           
static int CV_CAP_ANDROID_COLOR_FRAME
           
static int CV_CAP_ANDROID_COLOR_FRAME_BGR
           
static int CV_CAP_ANDROID_COLOR_FRAME_BGRA
           
static int CV_CAP_ANDROID_COLOR_FRAME_RGB
           
static int CV_CAP_ANDROID_COLOR_FRAME_RGBA
           
static int CV_CAP_ANDROID_FLASH_MODE_AUTO
           
static int CV_CAP_ANDROID_FLASH_MODE_OFF
           
static int CV_CAP_ANDROID_FLASH_MODE_ON
           
static int CV_CAP_ANDROID_FLASH_MODE_RED_EYE
           
static int CV_CAP_ANDROID_FLASH_MODE_TORCH
           
static int CV_CAP_ANDROID_FOCUS_MODE_AUTO
           
static int CV_CAP_ANDROID_FOCUS_MODE_CONTINUOUS_VIDEO
           
static int CV_CAP_ANDROID_FOCUS_MODE_EDOF
           
static int CV_CAP_ANDROID_FOCUS_MODE_FIXED
           
static int CV_CAP_ANDROID_FOCUS_MODE_INFINITY
           
static int CV_CAP_ANDROID_FOCUS_MODE_MACRO
           
static int CV_CAP_ANDROID_GREY_FRAME
           
static int CV_CAP_ANDROID_WHITE_BALANCE_AUTO
           
static int CV_CAP_ANDROID_WHITE_BALANCE_CLOUDY_DAYLIGHT
           
static int CV_CAP_ANDROID_WHITE_BALANCE_DAYLIGHT
           
static int CV_CAP_ANDROID_WHITE_BALANCE_FLUORESCENT
           
static int CV_CAP_ANDROID_WHITE_BALANCE_INCANDESCENT
           
static int CV_CAP_ANDROID_WHITE_BALANCE_SHADE
           
static int CV_CAP_ANDROID_WHITE_BALANCE_TWILIGHT
           
static int CV_CAP_ANDROID_WHITE_BALANCE_WARM_FLUORESCENT
           
static int CV_CAP_AVFOUNDATION
           
static int CV_CAP_PROP_ANDROID_ANTIBANDING
           
static int CV_CAP_PROP_ANDROID_FLASH_MODE
           
static int CV_CAP_PROP_ANDROID_FOCAL_LENGTH
           
static int CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_FAR
           
static int CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_NEAR
           
static int CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_OPTIMAL
           
static int CV_CAP_PROP_ANDROID_FOCUS_MODE
           
static int CV_CAP_PROP_ANDROID_WHITE_BALANCE
           
static int CV_CAP_PROP_AUTOGRAB
           
static int CV_CAP_PROP_BACKLIGHT
           
static int CV_CAP_PROP_FOCUS
           
static int CV_CAP_PROP_FRAME_HEIGHT
           
static int CV_CAP_PROP_FRAME_WIDTH
           
static int CV_CAP_PROP_GUID
           
static int CV_CAP_PROP_IOS_DEVICE_EXPOSURE
           
static int CV_CAP_PROP_IOS_DEVICE_FLASH
           
static int CV_CAP_PROP_IOS_DEVICE_FOCUS
           
static int CV_CAP_PROP_IOS_DEVICE_TORCH
           
static int CV_CAP_PROP_IOS_DEVICE_WHITEBALANCE
           
static int CV_CAP_PROP_IRIS
           
static int CV_CAP_PROP_ISO_SPEED
           
static int CV_CAP_PROP_PAN
           
static int CV_CAP_PROP_PREVIEW_FORMAT
           
static int CV_CAP_PROP_ROLL
           
static int CV_CAP_PROP_SETTINGS
           
static int CV_CAP_PROP_TILT
           
static int CV_CAP_PROP_XI_AE_MAX_LIMIT
           
static int CV_CAP_PROP_XI_AEAG
           
static int CV_CAP_PROP_XI_AEAG_LEVEL
           
static int CV_CAP_PROP_XI_AG_MAX_LIMIT
           
static int CV_CAP_PROP_XI_AUTO_WB
           
static int CV_CAP_PROP_XI_DATA_FORMAT
           
static int CV_CAP_PROP_XI_DOWNSAMPLING
           
static int CV_CAP_PROP_XI_EXP_PRIORITY
           
static int CV_CAP_PROP_XI_GPI_LEVEL
           
static int CV_CAP_PROP_XI_GPI_MODE
           
static int CV_CAP_PROP_XI_GPI_SELECTOR
           
static int CV_CAP_PROP_XI_GPO_MODE
           
static int CV_CAP_PROP_XI_GPO_SELECTOR
           
static int CV_CAP_PROP_XI_LED_MODE
           
static int CV_CAP_PROP_XI_LED_SELECTOR
           
static int CV_CAP_PROP_XI_MANUAL_WB
           
static int CV_CAP_PROP_XI_OFFSET_X
           
static int CV_CAP_PROP_XI_OFFSET_Y
           
static int CV_CAP_PROP_XI_TIMEOUT
           
static int CV_CAP_PROP_XI_TRG_SOFTWARE
           
static int CV_CAP_PROP_XI_TRG_SOURCE
           
static int CV_CAP_PROP_ZOOM
           
static int CV_CAP_XIAPI
           
static int CV_CVTIMG_FLIP
           
static int CV_CVTIMG_SWAP_RB
           
static int CV_FONT_BLACK
           
static int CV_FONT_BOLD
           
static int CV_FONT_DEMIBOLD
           
static int CV_FONT_LIGHT
           
static int CV_FONT_NORMAL
           
static int CV_IMWRITE_JPEG_QUALITY
           
static int CV_IMWRITE_PNG_COMPRESSION
           
static int CV_IMWRITE_PNG_STRATEGY
           
static int CV_IMWRITE_PNG_STRATEGY_DEFAULT
           
static int CV_IMWRITE_PNG_STRATEGY_FILTERED
           
static int CV_IMWRITE_PNG_STRATEGY_FIXED
           
static int CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY
           
static int CV_IMWRITE_PNG_STRATEGY_RLE
           
static int CV_IMWRITE_PXM_BINARY
           
static int CV_LOAD_IMAGE_ANYCOLOR
           
static int CV_LOAD_IMAGE_ANYDEPTH
           
static int CV_LOAD_IMAGE_COLOR
           
static int CV_LOAD_IMAGE_GRAYSCALE
           
static int CV_LOAD_IMAGE_UNCHANGED
           
static int CV_STYLE_ITALIC
           
static int CV_STYLE_NORMAL
           
static int CV_STYLE_OBLIQUE
           
static int IMREAD_ANYCOLOR
           
static int IMREAD_ANYDEPTH
           
static int IMREAD_COLOR
           
static int IMREAD_GRAYSCALE
           
static int IMREAD_UNCHANGED
           
static int IMWRITE_JPEG_QUALITY
           
static int IMWRITE_PNG_COMPRESSION
           
static int IMWRITE_PNG_STRATEGY
           
static int IMWRITE_PNG_STRATEGY_DEFAULT
           
static int IMWRITE_PNG_STRATEGY_FILTERED
           
static int IMWRITE_PNG_STRATEGY_FIXED
           
static int IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY
           
static int IMWRITE_PNG_STRATEGY_RLE
           
static int IMWRITE_PXM_BINARY
           
 
Constructor Summary
Highgui()
           
 
Method Summary
static Mat imdecode(Mat buf, int flags)
          Reads an image from a buffer in memory.
static boolean imencode(java.lang.String ext, Mat img, MatOfByte buf)
          Encodes an image into a memory buffer.
static boolean imencode(java.lang.String ext, Mat img, MatOfByte buf, MatOfInt params)
          Encodes an image into a memory buffer.
static Mat imread(java.lang.String filename)
          Loads an image from a file.
static Mat imread(java.lang.String filename, int flags)
          Loads an image from a file.
static boolean imwrite(java.lang.String filename, Mat img)
          Saves an image to a specified file.
static boolean imwrite(java.lang.String filename, Mat img, MatOfInt params)
          Saves an image to a specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CV_CAP_ANDROID

public static final int CV_CAP_ANDROID
See Also:
Constant Field Values

CV_CAP_ANDROID_ANTIBANDING_50HZ

public static final int CV_CAP_ANDROID_ANTIBANDING_50HZ
See Also:
Constant Field Values

CV_CAP_ANDROID_ANTIBANDING_60HZ

public static final int CV_CAP_ANDROID_ANTIBANDING_60HZ
See Also:
Constant Field Values

CV_CAP_ANDROID_ANTIBANDING_AUTO

public static final int CV_CAP_ANDROID_ANTIBANDING_AUTO
See Also:
Constant Field Values

CV_CAP_ANDROID_ANTIBANDING_OFF

public static final int CV_CAP_ANDROID_ANTIBANDING_OFF
See Also:
Constant Field Values

CV_CAP_ANDROID_COLOR_FRAME

public static final int CV_CAP_ANDROID_COLOR_FRAME
See Also:
Constant Field Values

CV_CAP_ANDROID_COLOR_FRAME_BGR

public static final int CV_CAP_ANDROID_COLOR_FRAME_BGR
See Also:
Constant Field Values

CV_CAP_ANDROID_COLOR_FRAME_BGRA

public static final int CV_CAP_ANDROID_COLOR_FRAME_BGRA
See Also:
Constant Field Values

CV_CAP_ANDROID_COLOR_FRAME_RGB

public static final int CV_CAP_ANDROID_COLOR_FRAME_RGB
See Also:
Constant Field Values

CV_CAP_ANDROID_COLOR_FRAME_RGBA

public static final int CV_CAP_ANDROID_COLOR_FRAME_RGBA
See Also:
Constant Field Values

CV_CAP_ANDROID_FLASH_MODE_AUTO

public static final int CV_CAP_ANDROID_FLASH_MODE_AUTO
See Also:
Constant Field Values

CV_CAP_ANDROID_FLASH_MODE_OFF

public static final int CV_CAP_ANDROID_FLASH_MODE_OFF
See Also:
Constant Field Values

CV_CAP_ANDROID_FLASH_MODE_ON

public static final int CV_CAP_ANDROID_FLASH_MODE_ON
See Also:
Constant Field Values

CV_CAP_ANDROID_FLASH_MODE_RED_EYE

public static final int CV_CAP_ANDROID_FLASH_MODE_RED_EYE
See Also:
Constant Field Values

CV_CAP_ANDROID_FLASH_MODE_TORCH

public static final int CV_CAP_ANDROID_FLASH_MODE_TORCH
See Also:
Constant Field Values

CV_CAP_ANDROID_FOCUS_MODE_AUTO

public static final int CV_CAP_ANDROID_FOCUS_MODE_AUTO
See Also:
Constant Field Values

CV_CAP_ANDROID_FOCUS_MODE_CONTINUOUS_VIDEO

public static final int CV_CAP_ANDROID_FOCUS_MODE_CONTINUOUS_VIDEO
See Also:
Constant Field Values

CV_CAP_ANDROID_FOCUS_MODE_EDOF

public static final int CV_CAP_ANDROID_FOCUS_MODE_EDOF
See Also:
Constant Field Values

CV_CAP_ANDROID_FOCUS_MODE_FIXED

public static final int CV_CAP_ANDROID_FOCUS_MODE_FIXED
See Also:
Constant Field Values

CV_CAP_ANDROID_FOCUS_MODE_INFINITY

public static final int CV_CAP_ANDROID_FOCUS_MODE_INFINITY
See Also:
Constant Field Values

CV_CAP_ANDROID_FOCUS_MODE_MACRO

public static final int CV_CAP_ANDROID_FOCUS_MODE_MACRO
See Also:
Constant Field Values

CV_CAP_ANDROID_GREY_FRAME

public static final int CV_CAP_ANDROID_GREY_FRAME
See Also:
Constant Field Values

CV_CAP_ANDROID_WHITE_BALANCE_AUTO

public static final int CV_CAP_ANDROID_WHITE_BALANCE_AUTO
See Also:
Constant Field Values

CV_CAP_ANDROID_WHITE_BALANCE_CLOUDY_DAYLIGHT

public static final int CV_CAP_ANDROID_WHITE_BALANCE_CLOUDY_DAYLIGHT
See Also:
Constant Field Values

CV_CAP_ANDROID_WHITE_BALANCE_DAYLIGHT

public static final int CV_CAP_ANDROID_WHITE_BALANCE_DAYLIGHT
See Also:
Constant Field Values

CV_CAP_ANDROID_WHITE_BALANCE_FLUORESCENT

public static final int CV_CAP_ANDROID_WHITE_BALANCE_FLUORESCENT
See Also:
Constant Field Values

CV_CAP_ANDROID_WHITE_BALANCE_INCANDESCENT

public static final int CV_CAP_ANDROID_WHITE_BALANCE_INCANDESCENT
See Also:
Constant Field Values

CV_CAP_ANDROID_WHITE_BALANCE_SHADE

public static final int CV_CAP_ANDROID_WHITE_BALANCE_SHADE
See Also:
Constant Field Values

CV_CAP_ANDROID_WHITE_BALANCE_TWILIGHT

public static final int CV_CAP_ANDROID_WHITE_BALANCE_TWILIGHT
See Also:
Constant Field Values

CV_CAP_ANDROID_WHITE_BALANCE_WARM_FLUORESCENT

public static final int CV_CAP_ANDROID_WHITE_BALANCE_WARM_FLUORESCENT
See Also:
Constant Field Values

CV_CAP_AVFOUNDATION

public static final int CV_CAP_AVFOUNDATION
See Also:
Constant Field Values

CV_CAP_PROP_ANDROID_ANTIBANDING

public static final int CV_CAP_PROP_ANDROID_ANTIBANDING
See Also:
Constant Field Values

CV_CAP_PROP_ANDROID_FLASH_MODE

public static final int CV_CAP_PROP_ANDROID_FLASH_MODE
See Also:
Constant Field Values

CV_CAP_PROP_ANDROID_FOCAL_LENGTH

public static final int CV_CAP_PROP_ANDROID_FOCAL_LENGTH
See Also:
Constant Field Values

CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_FAR

public static final int CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_FAR
See Also:
Constant Field Values

CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_NEAR

public static final int CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_NEAR
See Also:
Constant Field Values

CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_OPTIMAL

public static final int CV_CAP_PROP_ANDROID_FOCUS_DISTANCE_OPTIMAL
See Also:
Constant Field Values

CV_CAP_PROP_ANDROID_FOCUS_MODE

public static final int CV_CAP_PROP_ANDROID_FOCUS_MODE
See Also:
Constant Field Values

CV_CAP_PROP_ANDROID_WHITE_BALANCE

public static final int CV_CAP_PROP_ANDROID_WHITE_BALANCE
See Also:
Constant Field Values

CV_CAP_PROP_AUTOGRAB

public static final int CV_CAP_PROP_AUTOGRAB
See Also:
Constant Field Values

CV_CAP_PROP_BACKLIGHT

public static final int CV_CAP_PROP_BACKLIGHT
See Also:
Constant Field Values

CV_CAP_PROP_FOCUS

public static final int CV_CAP_PROP_FOCUS
See Also:
Constant Field Values

CV_CAP_PROP_FRAME_HEIGHT

public static final int CV_CAP_PROP_FRAME_HEIGHT
See Also:
Constant Field Values

CV_CAP_PROP_FRAME_WIDTH

public static final int CV_CAP_PROP_FRAME_WIDTH
See Also:
Constant Field Values

CV_CAP_PROP_GUID

public static final int CV_CAP_PROP_GUID
See Also:
Constant Field Values

CV_CAP_PROP_IOS_DEVICE_EXPOSURE

public static final int CV_CAP_PROP_IOS_DEVICE_EXPOSURE
See Also:
Constant Field Values

CV_CAP_PROP_IOS_DEVICE_FLASH

public static final int CV_CAP_PROP_IOS_DEVICE_FLASH
See Also:
Constant Field Values

CV_CAP_PROP_IOS_DEVICE_FOCUS

public static final int CV_CAP_PROP_IOS_DEVICE_FOCUS
See Also:
Constant Field Values

CV_CAP_PROP_IOS_DEVICE_TORCH

public static final int CV_CAP_PROP_IOS_DEVICE_TORCH
See Also:
Constant Field Values

CV_CAP_PROP_IOS_DEVICE_WHITEBALANCE

public static final int CV_CAP_PROP_IOS_DEVICE_WHITEBALANCE
See Also:
Constant Field Values

CV_CAP_PROP_IRIS

public static final int CV_CAP_PROP_IRIS
See Also:
Constant Field Values

CV_CAP_PROP_ISO_SPEED

public static final int CV_CAP_PROP_ISO_SPEED
See Also:
Constant Field Values

CV_CAP_PROP_PAN

public static final int CV_CAP_PROP_PAN
See Also:
Constant Field Values

CV_CAP_PROP_PREVIEW_FORMAT

public static final int CV_CAP_PROP_PREVIEW_FORMAT
See Also:
Constant Field Values

CV_CAP_PROP_ROLL

public static final int CV_CAP_PROP_ROLL
See Also:
Constant Field Values

CV_CAP_PROP_SETTINGS

public static final int CV_CAP_PROP_SETTINGS
See Also:
Constant Field Values

CV_CAP_PROP_TILT

public static final int CV_CAP_PROP_TILT
See Also:
Constant Field Values

CV_CAP_PROP_XI_AE_MAX_LIMIT

public static final int CV_CAP_PROP_XI_AE_MAX_LIMIT
See Also:
Constant Field Values

CV_CAP_PROP_XI_AEAG

public static final int CV_CAP_PROP_XI_AEAG
See Also:
Constant Field Values

CV_CAP_PROP_XI_AEAG_LEVEL

public static final int CV_CAP_PROP_XI_AEAG_LEVEL
See Also:
Constant Field Values

CV_CAP_PROP_XI_AG_MAX_LIMIT

public static final int CV_CAP_PROP_XI_AG_MAX_LIMIT
See Also:
Constant Field Values

CV_CAP_PROP_XI_AUTO_WB

public static final int CV_CAP_PROP_XI_AUTO_WB
See Also:
Constant Field Values

CV_CAP_PROP_XI_DATA_FORMAT

public static final int CV_CAP_PROP_XI_DATA_FORMAT
See Also:
Constant Field Values

CV_CAP_PROP_XI_DOWNSAMPLING

public static final int CV_CAP_PROP_XI_DOWNSAMPLING
See Also:
Constant Field Values

CV_CAP_PROP_XI_EXP_PRIORITY

public static final int CV_CAP_PROP_XI_EXP_PRIORITY
See Also:
Constant Field Values

CV_CAP_PROP_XI_GPI_LEVEL

public static final int CV_CAP_PROP_XI_GPI_LEVEL
See Also:
Constant Field Values

CV_CAP_PROP_XI_GPI_MODE

public static final int CV_CAP_PROP_XI_GPI_MODE
See Also:
Constant Field Values

CV_CAP_PROP_XI_GPI_SELECTOR

public static final int CV_CAP_PROP_XI_GPI_SELECTOR
See Also:
Constant Field Values

CV_CAP_PROP_XI_GPO_MODE

public static final int CV_CAP_PROP_XI_GPO_MODE
See Also:
Constant Field Values

CV_CAP_PROP_XI_GPO_SELECTOR

public static final int CV_CAP_PROP_XI_GPO_SELECTOR
See Also:
Constant Field Values

CV_CAP_PROP_XI_LED_MODE

public static final int CV_CAP_PROP_XI_LED_MODE
See Also:
Constant Field Values

CV_CAP_PROP_XI_LED_SELECTOR

public static final int CV_CAP_PROP_XI_LED_SELECTOR
See Also:
Constant Field Values

CV_CAP_PROP_XI_MANUAL_WB

public static final int CV_CAP_PROP_XI_MANUAL_WB
See Also:
Constant Field Values

CV_CAP_PROP_XI_OFFSET_X

public static final int CV_CAP_PROP_XI_OFFSET_X
See Also:
Constant Field Values

CV_CAP_PROP_XI_OFFSET_Y

public static final int CV_CAP_PROP_XI_OFFSET_Y
See Also:
Constant Field Values

CV_CAP_PROP_XI_TIMEOUT

public static final int CV_CAP_PROP_XI_TIMEOUT
See Also:
Constant Field Values

CV_CAP_PROP_XI_TRG_SOFTWARE

public static final int CV_CAP_PROP_XI_TRG_SOFTWARE
See Also:
Constant Field Values

CV_CAP_PROP_XI_TRG_SOURCE

public static final int CV_CAP_PROP_XI_TRG_SOURCE
See Also:
Constant Field Values

CV_CAP_PROP_ZOOM

public static final int CV_CAP_PROP_ZOOM
See Also:
Constant Field Values

CV_CAP_XIAPI

public static final int CV_CAP_XIAPI
See Also:
Constant Field Values

CV_CVTIMG_FLIP

public static final int CV_CVTIMG_FLIP
See Also:
Constant Field Values

CV_CVTIMG_SWAP_RB

public static final int CV_CVTIMG_SWAP_RB
See Also:
Constant Field Values

CV_FONT_BLACK

public static final int CV_FONT_BLACK
See Also:
Constant Field Values

CV_FONT_BOLD

public static final int CV_FONT_BOLD
See Also:
Constant Field Values

CV_FONT_DEMIBOLD

public static final int CV_FONT_DEMIBOLD
See Also:
Constant Field Values

CV_FONT_LIGHT

public static final int CV_FONT_LIGHT
See Also:
Constant Field Values

CV_FONT_NORMAL

public static final int CV_FONT_NORMAL
See Also:
Constant Field Values

CV_IMWRITE_JPEG_QUALITY

public static final int CV_IMWRITE_JPEG_QUALITY
See Also:
Constant Field Values

CV_IMWRITE_PNG_COMPRESSION

public static final int CV_IMWRITE_PNG_COMPRESSION
See Also:
Constant Field Values

CV_IMWRITE_PNG_STRATEGY

public static final int CV_IMWRITE_PNG_STRATEGY
See Also:
Constant Field Values

CV_IMWRITE_PNG_STRATEGY_DEFAULT

public static final int CV_IMWRITE_PNG_STRATEGY_DEFAULT
See Also:
Constant Field Values

CV_IMWRITE_PNG_STRATEGY_FILTERED

public static final int CV_IMWRITE_PNG_STRATEGY_FILTERED
See Also:
Constant Field Values

CV_IMWRITE_PNG_STRATEGY_FIXED

public static final int CV_IMWRITE_PNG_STRATEGY_FIXED
See Also:
Constant Field Values

CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY

public static final int CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY
See Also:
Constant Field Values

CV_IMWRITE_PNG_STRATEGY_RLE

public static final int CV_IMWRITE_PNG_STRATEGY_RLE
See Also:
Constant Field Values

CV_IMWRITE_PXM_BINARY

public static final int CV_IMWRITE_PXM_BINARY
See Also:
Constant Field Values

CV_LOAD_IMAGE_ANYCOLOR

public static final int CV_LOAD_IMAGE_ANYCOLOR
See Also:
Constant Field Values

CV_LOAD_IMAGE_ANYDEPTH

public static final int CV_LOAD_IMAGE_ANYDEPTH
See Also:
Constant Field Values

CV_LOAD_IMAGE_COLOR

public static final int CV_LOAD_IMAGE_COLOR
See Also:
Constant Field Values

CV_LOAD_IMAGE_GRAYSCALE

public static final int CV_LOAD_IMAGE_GRAYSCALE
See Also:
Constant Field Values

CV_LOAD_IMAGE_UNCHANGED

public static final int CV_LOAD_IMAGE_UNCHANGED
See Also:
Constant Field Values

CV_STYLE_ITALIC

public static final int CV_STYLE_ITALIC
See Also:
Constant Field Values

CV_STYLE_NORMAL

public static final int CV_STYLE_NORMAL
See Also:
Constant Field Values

CV_STYLE_OBLIQUE

public static final int CV_STYLE_OBLIQUE
See Also:
Constant Field Values

IMREAD_ANYCOLOR

public static final int IMREAD_ANYCOLOR
See Also:
Constant Field Values

IMREAD_ANYDEPTH

public static final int IMREAD_ANYDEPTH
See Also:
Constant Field Values

IMREAD_COLOR

public static final int IMREAD_COLOR
See Also:
Constant Field Values

IMREAD_GRAYSCALE

public static final int IMREAD_GRAYSCALE
See Also:
Constant Field Values

IMREAD_UNCHANGED

public static final int IMREAD_UNCHANGED
See Also:
Constant Field Values

IMWRITE_JPEG_QUALITY

public static final int IMWRITE_JPEG_QUALITY
See Also:
Constant Field Values

IMWRITE_PNG_COMPRESSION

public static final int IMWRITE_PNG_COMPRESSION
See Also:
Constant Field Values

IMWRITE_PNG_STRATEGY

public static final int IMWRITE_PNG_STRATEGY
See Also:
Constant Field Values

IMWRITE_PNG_STRATEGY_DEFAULT

public static final int IMWRITE_PNG_STRATEGY_DEFAULT
See Also:
Constant Field Values

IMWRITE_PNG_STRATEGY_FILTERED

public static final int IMWRITE_PNG_STRATEGY_FILTERED
See Also:
Constant Field Values

IMWRITE_PNG_STRATEGY_FIXED

public static final int IMWRITE_PNG_STRATEGY_FIXED
See Also:
Constant Field Values

IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY

public static final int IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY
See Also:
Constant Field Values

IMWRITE_PNG_STRATEGY_RLE

public static final int IMWRITE_PNG_STRATEGY_RLE
See Also:
Constant Field Values

IMWRITE_PXM_BINARY

public static final int IMWRITE_PXM_BINARY
See Also:
Constant Field Values
Constructor Detail

Highgui

public Highgui()
Method Detail

imdecode

public static Mat imdecode(Mat buf,
                           int flags)

Reads an image from a buffer in memory.

The function reads an image from the specified buffer in the memory. If the buffer is too short or contains invalid data, the empty matrix/image is returned.

See "imread" for the list of supported formats and flags description.

Parameters:
buf - Input array or vector of bytes.
flags - The same flags as in "imread".
See Also:
org.opencv.highgui.Highgui.imdecode

imencode

public static boolean imencode(java.lang.String ext,
                               Mat img,
                               MatOfByte buf)

Encodes an image into a memory buffer.

The function compresses the image and stores it in the memory buffer that is resized to fit the result. See "imwrite" for the list of supported formats and flags description.

Note: cvEncodeImage returns single-row matrix of type CV_8UC1 that contains encoded image as array of bytes.

Parameters:
ext - File extension that defines the output format.
img - Image to be written.
buf - Output buffer resized to fit the compressed image.
See Also:
org.opencv.highgui.Highgui.imencode

imencode

public static boolean imencode(java.lang.String ext,
                               Mat img,
                               MatOfByte buf,
                               MatOfInt params)

Encodes an image into a memory buffer.

The function compresses the image and stores it in the memory buffer that is resized to fit the result. See "imwrite" for the list of supported formats and flags description.

Note: cvEncodeImage returns single-row matrix of type CV_8UC1 that contains encoded image as array of bytes.

Parameters:
ext - File extension that defines the output format.
img - Image to be written.
buf - Output buffer resized to fit the compressed image.
params - Format-specific parameters. See "imwrite".
See Also:
org.opencv.highgui.Highgui.imencode

imread

public static Mat imread(java.lang.String filename)

Loads an image from a file.

The function imread loads an image from the specified file and returns it. If the image cannot be read (because of missing file, improper permissions, unsupported or invalid format), the function returns an empty matrix (Mat.data==NULL). Currently, the following file formats are supported:

Note:

Parameters:
filename - Name of file to be loaded.
See Also:
org.opencv.highgui.Highgui.imread

imread

public static Mat imread(java.lang.String filename,
                         int flags)

Loads an image from a file.

The function imread loads an image from the specified file and returns it. If the image cannot be read (because of missing file, improper permissions, unsupported or invalid format), the function returns an empty matrix (Mat.data==NULL). Currently, the following file formats are supported:

Note:

Parameters:
filename - Name of file to be loaded.
flags - Flags specifying the color type of a loaded image:
  • >0 Return a 3-channel color image
  • =0 Return a grayscale image
  • <0 Return the loaded image as is. Note that in the current implementation the alpha channel, if any, is stripped from the output image. For example, a 4-channel RGBA image is loaded as RGB if flags >= 0.
See Also:
org.opencv.highgui.Highgui.imread

imwrite

public static boolean imwrite(java.lang.String filename,
                              Mat img)

Saves an image to a specified file.

The function imwrite saves the image to the specified file. The image format is chosen based on the filename extension (see "imread" for the list of extensions). Only 8-bit (or 16-bit in case of PNG, JPEG 2000, and TIFF) single-channel or 3-channel (with 'BGR' channel order) images can be saved using this function. If the format, depth or channel order is different, use "Mat.convertTo", and "cvtColor" to convert it before saving. Or, use the universal XML I/O functions to save the image to XML or YAML format.

It is possible to store PNG images with an alpha channel using this function. To do this, create 8-bit (or 16-bit) 4-channel image BGRA, where the alpha channel goes last. Fully transparent pixels should have alpha set to 0, fully opaque pixels should have alpha set to 255/65535. The sample below shows how to create such a BGRA image and store to PNG file. It also demonstrates how to set custom compression parameters

Parameters:
filename - Name of the file.
img - a img
See Also:
org.opencv.highgui.Highgui.imwrite

imwrite

public static boolean imwrite(java.lang.String filename,
                              Mat img,
                              MatOfInt params)

Saves an image to a specified file.

The function imwrite saves the image to the specified file. The image format is chosen based on the filename extension (see "imread" for the list of extensions). Only 8-bit (or 16-bit in case of PNG, JPEG 2000, and TIFF) single-channel or 3-channel (with 'BGR' channel order) images can be saved using this function. If the format, depth or channel order is different, use "Mat.convertTo", and "cvtColor" to convert it before saving. Or, use the universal XML I/O functions to save the image to XML or YAML format.

It is possible to store PNG images with an alpha channel using this function. To do this, create 8-bit (or 16-bit) 4-channel image BGRA, where the alpha channel goes last. Fully transparent pixels should have alpha set to 0, fully opaque pixels should have alpha set to 255/65535. The sample below shows how to create such a BGRA image and store to PNG file. It also demonstrates how to set custom compression parameters

Parameters:
filename - Name of the file.
img - a img
params - Format-specific save parameters encoded as pairs paramId_1, paramValue_1, paramId_2, paramValue_2,.... The following parameters are currently supported:
  • For JPEG, it can be a quality (CV_IMWRITE_JPEG_QUALITY) from 0 to 100 (the higher is the better). Default value is 95.
  • For PNG, it can be the compression level (CV_IMWRITE_PNG_COMPRESSION) from 0 to 9. A higher value means a smaller size and longer compression time. Default value is 3.
  • For PPM, PGM, or PBM, it can be a binary format flag (CV_IMWRITE_PXM_BINARY), 0 or 1. Default value is 1.
See Also:
org.opencv.highgui.Highgui.imwrite

Official OpenCV 2.4 Documentation