- Main Page
- Modules
- Namespaces
- Classes
- Files

- Search for |

- File List
- File Members

# samples/11_camera_object_identification/camera_caffe_main.h

Go to the documentation of this file.

    00001 /*
    00002  * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
    00003  *
    00004  * Redistribution and use in source and binary forms, with or without
    00005  * modification, are permitted provided that the following conditions
    00006  * are met:
    00007  *  * Redistributions of source code must retain the above copyright
    00008  *    notice, this list of conditions and the following disclaimer.
    00009  *  * Redistributions in binary form must reproduce the above copyright
    00010  *    notice, this list of conditions and the following disclaimer in the
    00011  *    documentation and/or other materials provided with the distribution.
    00012  *  * Neither the name of NVIDIA CORPORATION nor the names of its
    00013  *    contributors may be used to endorse or promote products derived
    00014  *    from this software without specific prior written permission.
    00015  *
    00016  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
    00017  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    00018  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    00019  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    00020  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    00021  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    00022  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    00023  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    00024  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    00026  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00027  */
    00028
    00029 #ifndef _CAMERA_CAFFE_MAIN_H
    00030 #define _CAMERA_CAFFE_MAIN_H
    00031
    00032 #include <iostream>
    00033 #include <fstream>
    00034 #include <queue>
    00035
    00036 #include <unistd.h>
    00037 #include <stdio.h>
    00038 #include <stdlib.h>
    00039 #include <dlfcn.h>
    00040
    00041 #include "Error.h"
    00042 #include "Thread.h"
    00043
    00044 #include <Argus/Argus.h>
    00045 #include <EGLStream/EGLStream.h>
    00046 #include <EGLStream/NV/ImageNativeBuffer.h>
    00047
    00048 #include "NvVideoConverter.h"
    00049 #include <NvApplicationProfiler.h>
    00050
    00051 #include "opencv_consumer_interface.h"
    00052
    00053 #define FRAME_CONVERTER_BUF_NUMBER (10)
    00054
    00055 typedef struct _camera_caffe_context_t {
    00056     int width;
    00057     int height;
    00058
    00059     char *lib_file;
    00060     void *lib_handler;
    00061     opencv_handler_open_t opencv_handler_open;
    00062     opencv_handler_close_t opencv_handler_close;
    00063     opencv_img_processing_t opencv_img_processing;
    00064     opencv_set_config_t opencv_set_config;
    00065     void *opencv_handler;
    00066
    00067     char *model_file;
    00068     char *trained_file;
    00069     char *mean_file;
    00070     char *label_file;
    00071
    00072     pthread_t thread_id;
    00073
    00074 } camera_caffe_context;
    00075
    00076 int parse_csv_args(camera_caffe_context *p_ctx, int argc, const char *argv[]);
    00077
    00078 #endif  /* #ifndef _CAMERA_CAFFE_MAIN_H */