Skip to content

Group cuvis_proc

Modules > cuvis_proc

More...

Public Functions

Type Name
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_apply (CUVIS_PROC_CONT i_procCont, CUVIS_MESU i_mesu)
(Re-)Process a measurement
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_calc_distance (CUVIS_PROC_CONT i_procCont, double i_distanceMM)
Set the operating distance by value.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_clear_reference (CUVIS_PROC_CONT i_procCont, CUVIS_REFERENCE_TYPE i_type)
Clears a reference measurement.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_copy_handle (CUVIS_PROC_CONT i_procCont, CUVIS_PROC_CONT * o_pProcCont)
Creates an additional processing context handle.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_create_from_calib (CUVIS_CALIB i_calib, CUVIS_PROC_CONT * o_pProcCont)
Load a processing context from a given calibration.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_create_from_mesu (CUVIS_MESU i_mesu, CUVIS_INT i_loadReferences, CUVIS_PROC_CONT * o_pProcCont)
Load a processing context from a given measurement.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_create_from_session_file (CUVIS_SESSION_FILE i_sess, CUVIS_INT i_loadReferences, CUVIS_PROC_CONT * o_pProcCont)
Load a processing context from a given session_file.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_free (CUVIS_PROC_CONT * io_pProcCont)
Clear a loaded processing context by it's handle.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_get_reference (CUVIS_PROC_CONT i_procCont, CUVIS_MESU * o_pMesu, CUVIS_REFERENCE_TYPE i_type)
get a specific reference from the processing context
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_has_reference (CUVIS_PROC_CONT i_procCont, CUVIS_REFERENCE_TYPE i_type, CUVIS_INT * o_pHasReference)
Check if an explicit reference was set.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_is_capable (CUVIS_PROC_CONT i_procCont, CUVIS_MESU i_mesu, CUVIS_PROC_ARGS i_args, CUVIS_INT * o_pIsCapable)
Check if a processing mode is possible for a measurement.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_set_args (CUVIS_PROC_CONT i_procCont, CUVIS_PROC_ARGS i_args)
Sets the processing arguments for a processing contex.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_proc_cont_set_reference (CUVIS_PROC_CONT i_procCont, CUVIS_MESU i_mesu, CUVIS_REFERENCE_TYPE i_type)
Set a reference measurement.

Detailed Description

Processing Images with the SDK.

Public Functions Documentation

function cuvis_proc_cont_apply

(Re-)Process a measurement

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_apply (
    CUVIS_PROC_CONT i_procCont,
    CUVIS_MESU i_mesu
) 

Process a measurement according to the current settings of the processing context. Those get set via cuvis_proc_cont_set_args The availability of the modes depends, use cuvis_proc_cont_is_capable to check if the processing is possible.

In short: Cube_Raw does not require references (Reference_Distance is optional)

Cube_DarkSubtract requires Reference_Dark (and Reference_Distance is optional)

Cube_Reflectance requires Reference_Dark and Reference_White reference (and Reference_Distance is optional), the Reference_WhiteDark is strongly recommended if using different integration times.

Cube_SpectralRadiance depends on the camera model: All cameras require Reference_SpRad. The Fireflye requires: Reference_Dark, Reference_White, the Ultris series requires only Reference_Dark.

Parameters:

  • i_procCont The handle of the processing context
  • i_mesu The measurement to be processed

Returns:

status_ok if measurement was processed.


function cuvis_proc_cont_calc_distance

Set the operating distance by value.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_calc_distance (
    CUVIS_PROC_CONT i_procCont,
    double i_distanceMM
) 

Some cameras require a distance reference (calibration). This is usually obtained from a measurement at that distance. However, if the distance is known, it can be set manually.

Note:

Some OEM-Cameras or older models do not support this.

Note:

Internally, a measurement is created. It can be obtained by cuvis_proc_cont_get_reference.

Parameters:

  • i_procCont The handle of the processing context
  • i_distanceMM The distance in millimeters.

Returns:

status_ok if the distance could be set


function cuvis_proc_cont_clear_reference

Clears a reference measurement.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_clear_reference (
    CUVIS_PROC_CONT i_procCont,
    CUVIS_REFERENCE_TYPE i_type
) 

Clears a reference explicitly set by cuvis_proc_cont_set_reference

Parameters:

  • i_procCont The handle of the processing context
  • i_type The type of the reference

function cuvis_proc_cont_copy_handle

Creates an additional processing context handle.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_copy_handle (
    CUVIS_PROC_CONT i_procCont,
    CUVIS_PROC_CONT * o_pProcCont
) 

Creates an additional handle that points to the same instance as the supplied handle

Parameters:

  • i_procCont The handle of the processing context to copy
  • o_pProcCont The new handle of the processing context.

Returns:

status_ok if the processing context handle could be doubled


function cuvis_proc_cont_create_from_calib

Load a processing context from a given calibration.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_create_from_calib (
    CUVIS_CALIB i_calib,
    CUVIS_PROC_CONT * o_pProcCont
) 

Load the processing context from the calibration.

Parameters:

  • i_calib The calibration instance the processing context will be loaded from
  • o_pProcCont The handle of the processing context.

Returns:

status_ok if the processing context could be loaded


function cuvis_proc_cont_create_from_mesu

Load a processing context from a given measurement.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_create_from_mesu (
    CUVIS_MESU i_mesu,
    CUVIS_INT i_loadReferences,
    CUVIS_PROC_CONT * o_pProcCont
) 

The processing context is loaded from the CALIBRATION directory, relative to the measurement given ( ../Calibration/* ) . This directory is present in the normal camera operation / recording, but the reference might get lost, if you manually move the measurements. In that case, this function will fail.

Parameters:

  • i_mesu The measurement with a valid reference to the processing context
  • o_pProcCont The handle of the processing context.

Returns:

status_ok if the processing context could be loaded


function cuvis_proc_cont_create_from_session_file

Load a processing context from a given session_file.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_create_from_session_file (
    CUVIS_SESSION_FILE i_sess,
    CUVIS_INT i_loadReferences,
    CUVIS_PROC_CONT * o_pProcCont
) 

The processing context from the embedded processing context of the session_info file.

Parameters:

  • i_sess The session_file with a valid reference to the processing context
  • o_pProcCont The handle of the processing context.

Returns:

status_ok if the processing context could be loaded


function cuvis_proc_cont_free

Clear a loaded processing context by it's handle.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_free (
    CUVIS_PROC_CONT * io_pProcCont
) 

The internal memory is freed.

Parameters:

  • io_pProcCont The handle of the processing context. The handle number will be invalidated.

Returns:

status_ok if processing context could be freed.


function cuvis_proc_cont_get_reference

get a specific reference from the processing context

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_get_reference (
    CUVIS_PROC_CONT i_procCont,
    CUVIS_MESU * o_pMesu,
    CUVIS_REFERENCE_TYPE i_type
) 

The processing context can hold explicit references (e.g. a dark), see cuvis_proc_cont_set_reference. These reference can be obtained by this functions

Note:

Implicit references given by a measurement are not returned. If they are available can only be checked indirectly by the cuvis_proc_cont_is_capable or by checking for the measurement's data keys CUVIS_MESU_DARKREF_KEY, CUVIS_MESU_WHITEREF_KEY and CUVIS_MESU_WHITEDARKREF_KEY

Parameters:

  • i_procCont The handle of the processing context
  • o_pMesu The reference measurement's handle
  • i_type The type of the measurement to be retrieved.

Returns:

status_ok if the reference measurement is available and could be loaded


function cuvis_proc_cont_has_reference

Check if an explicit reference was set.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_has_reference (
    CUVIS_PROC_CONT i_procCont,
    CUVIS_REFERENCE_TYPE i_type,
    CUVIS_INT * o_pHasReference
) 

Parameters:

  • i_procCont The handle of the processing context
  • i_type The reference type
  • o_pHasReference true, if reference is explicitly set. false, otherwise

Returns:

status_ok if no error occurred.


function cuvis_proc_cont_is_capable

Check if a processing mode is possible for a measurement.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_is_capable (
    CUVIS_PROC_CONT i_procCont,
    CUVIS_MESU i_mesu,
    CUVIS_PROC_ARGS i_args,
    CUVIS_INT * o_pIsCapable
) 

Depending on the measurement, it's intrinsic references, the processing context's explicit references and the internal camera calibration itself the availability of a mode varies.

Use this function, to check whether a specific mode is explicitly possible for a measurement.

Parameters:

  • i_procCont The handle of the processing context
  • i_mesu The measurement to be checked
  • i_args The processing options to be checked
  • o_pIsCapable true, if mode is possible. false, otherwise

Returns:

status_ok if no error occurred.


function cuvis_proc_cont_set_args

Sets the processing arguments for a processing contex.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_set_args (
    CUVIS_PROC_CONT i_procCont,
    CUVIS_PROC_ARGS i_args
) 

For processing a measurement see cuvis_proc_cont_apply

Parameters:

  • i_procCont The handle of the processing context
  • i_args The processing arguments that will be set

Returns:

status_ok if measurement was processed.


function cuvis_proc_cont_set_reference

Set a reference measurement.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_proc_cont_set_reference (
    CUVIS_PROC_CONT i_procCont,
    CUVIS_MESU i_mesu,
    CUVIS_REFERENCE_TYPE i_type
) 

The available processing modes (cuvis_processing_mode_t) require certain references to be set. When a measurement is recorded with references in place, these references are available per measurement implicitly. However, if you want to process measurements with different references, or if the measurement lacks a reference, they can be set with this function.

CUVIS_MESU mesu;
cuvis_measurement_load("mesu.cu3",&mesu);
//contains implicit Reference_Dark

CUVIS_PROC_CONT pc;
cuvis_proc_cont_create_from_mesu(mesu,&pc); //will implicitly load Reference_Dark

CUVIS_MESU white;
cuvis_measurement_load("white.cu3",&white);

cuvis_proc_cont_set_reference(pc, white, Reference_White);

//Cube_Reflectance requires Reference_Dark and Reference_White
cuvis_proc_cont_apply(pc,mesu,{Cube_Reflectance});

Note:

The reference explicitly set by this function has priority over the implicit measurement.

Parameters:

  • i_procCont The handle of the processing context
  • i_mesu The measurement to be used as explicit reference
  • i_type The type of the reference