C

Typedefs

typedefvoid ALPRSTREAM

void ALPRSTREAM

The instantiated AlprStream object. This is created by the alprstream_init()arrow-up-right function and should be passed into subsequent functions.

Functions

ALPRSTREAMarrow-up-right *alprstream_init(int framequeuesize, int usemotiondetection = 1)

Initializes the ALPRSTREAM instance. Each stream of video should have its own AlprStream instance. This object is threadsafe.

Returnan ALPRSTREAM instance that can be used in future calls. Call alprstream_cleanup()arrow-up-right once you’re finished with the object. See also alpr::AlprStream::AlprStream()arrow-up-right

int alprstreamgetqueue_size(ALPRSTREAMarrow-up-right *instance)

Check the size of the video buffer

See also alpr::AlprStream::get_queue_size()arrow-up-right

void alprstreamconnectvideostreamurl(ALPRSTREAMarrow-up-right *instance, const char *url)

See alpr::AlprStream::connect_video_stream_url()arrow-up-right

void alprstreamdisconnectvideo_stream(ALPRSTREAMarrow-up-right *instance)

See alpr::AlprStream::disconnect_video_stream()arrow-up-right

void alprstreamconnectvideo_file(ALPRSTREAMarrow-up-right *instance, const char *videofilepath, int64_t videostarttime)

See alpr::AlprStream::connect_video_file()arrow-up-right

void alprstreamdisconnectvideo_file(ALPRSTREAMarrow-up-right *instance)

See alpr::AlprStream::disconnect_video_file()arrow-up-right

int alprstreamvideofile_active(ALPRSTREAMarrow-up-right *instance)

See alpr::AlprStream::video_file_active()arrow-up-right

int alprstreampushframe_encoded(ALPRSTREAMarrow-up-right *instance, unsigned char *bytes, long long length, int64_t frameepochtime = -1)

See alpr::AlprStream::push_frame()arrow-up-right

int alprstreampushframe(ALPRSTREAMarrow-up-right *instance, unsigned char *pixelData, int bytesPerPixel, int imgWidth, int imgHeight, int64_t frameepochtime = -1)

See alpr::AlprStream::push_frame()arrow-up-right

AlprStreamRecognizedFrameCarrow-up-right *alprstreamprocessframe(ALPRSTREAMarrow-up-right *instance, OPENALPRarrow-up-right *alpr)

See alpr::AlprStream::process_frame()arrow-up-right. Each response must be freed with alprstream_free_frame_response()arrow-up-right

void alprstreamfreeframe_response(AlprStreamRecognizedFrameCarrow-up-right *response)

Frees memory from an alprstreamprocess_frame() response.

void alprstreamfreebatch_response(AlprStreamRecognizedBatchCarrow-up-right *response)

Frees memory from an alprstream_process_batch()arrow-up-right response.

AlprStreamRecognizedFrameCarrow-up-right *alprstreamskipframe(ALPRSTREAMarrow-up-right *instance, int return_image)

See alpr::AlprStream::skip_frame()arrow-up-right

AlprStreamRecognizedBatchCarrow-up-right *alprstreamprocessbatch(ALPRSTREAMarrow-up-right *instance, OPENALPRarrow-up-right *alpr)

See alpr::AlprStream::process_batch()arrow-up-right

char *alprstreampopcompleted_groups(ALPRSTREAMarrow-up-right *instance)

See alpr::AlprStream::pop_completed_groups()arrow-up-right

Returna JSON-formatted string describing the list of completed group results. Make sure to release the string memory using alprstream_free_response_string()arrow-up-right after using it

char *alprstreampeekactive_groups(ALPRSTREAMarrow-up-right *instance)

See alpr::AlprStream::peek_active_groups()arrow-up-right

Returna JSON-formatted string describing the list of active group results. Make sure to release the string memory using alprstream_free_response_string()arrow-up-right after using it

char *alprstreampopcompletedgroupsandrecognizevehicle(ALPRSTREAMarrow-up-right *instance, VEHICLECLASSIFIER *vehicle_classifier)

Gets the completed groups from the list and performs vehicle make/model/color/type recognition before returning vehicle results. This is a CPU or GPU intensive operation so it may be best to perform on a separate thread.

Returna JSON-formatted string describing the list of completed group results. Each group result will contain vehicle information as well. Make sure to release the string memory using alprstream_free_response_string()arrow-up-right after using itParameters

  • vehicle_classifier: An initialized instance of the VehicleClassifier that AlprStream will use to perform vehicle recognition

void alprstreamcombinegrouping(ALPRSTREAMarrow-up-right *instance, ALPRSTREAMarrow-up-right *other_stream)

See alpr::AlprStream::combine_grouping()arrow-up-right

void alprstreamsetuuid_format(ALPRSTREAMarrow-up-right *instance, const char *format)

See alpr::AlprStream::set_uuid_format()arrow-up-right

void alprstreamsetgroup_parameters(ALPRSTREAMarrow-up-right *instance, int minplatesto_group, int maxplatesper_group, float min_confidence, int maxdeltatime)

See alpr::AlprStream::set_group_parameters()arrow-up-right

void alprstreamsetenv_parameters(ALPRSTREAMarrow-up-right *instance, const char *company_id, const char *agent_uid, int camera_id)

See alpr::AlprStream::set_env_parameters()arrow-up-right

void alprstreamsetdetectionmaskencoded(ALPRSTREAMarrow-up-right *instance, unsigned char *bytes, long long length)

See alpr::AlprStream::set_detection_mask()arrow-up-right

void alprstreamsetdetection_mask(ALPRSTREAMarrow-up-right *instance, unsigned char *pixelData, int bytesPerPixel, int imgWidth, int imgHeight)

See alpr::AlprStream::set_detection_mask()arrow-up-right

void alprstreamsetjpeg_compression(ALPRSTREAMarrow-up-right *instance, int compression_level)

See alpr::AlprStream::set_jpeg_compression()arrow-up-right

void alprstreamsetencode_jpeg(ALPRSTREAMarrow-up-right *instance, int alwaysreturnjpeg)

See alpr::AlprStream::set_encode_jpeg()arrow-up-right

void alprstreamsetrecord_video(ALPRSTREAMarrow-up-right *instance, int enabled, int maxstoragesize_gb, char *rollingdbpath)

See alpr::AlprStream::set_record_video()arrow-up-right

void alprstreamfreeresponse_string(char *response)

Frees a char* response that was provided from a recognition request.

Parameters

  • response: A JSON character string from a previous pop/peek operation

void alprstream_cleanup(ALPRSTREAMarrow-up-right *instance)

Free the memory for the OpenALPR instance created with alprstream_init()arrow-up-right

structAlprStreamRecognizedFrameC #include <alprstream_c.h>

See alpr::RecognizedFramearrow-up-right.

Public Members

bool image_available

char *jpeg_bytes

int64_t jpegbytessize

int64_t frameepochtime_ms

int64_t frame_number

char *results_str

structAlprStreamRecognizedBatchC

Public Members

AlprStreamRecognizedFrameCarrow-up-right **results_array

size_t results_size

char *batch_results

Was this helpful?