initial upload
[apps/native/smart-surveillance-camera.git] / include / controller.h
1  /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __CONTROLLER_H__
18 #define __CONTROLLER_H__
19
20 #define MV_RESULT_COUNT_MAX 30
21 #define MV_RESULT_LENGTH_MAX (MV_RESULT_COUNT_MAX * 4) //4(x, y, w, h) * COUNT
22 #define IMAGE_INFO_MAX ((8 * MV_RESULT_LENGTH_MAX) + 4)
23
24 #define IMAGE_WIDTH 320
25 #define IMAGE_HEIGHT 240
26 #define CAMERA_IMAGE_QUALITY 100 //1~100
27 #define CAMERA_PREVIEW_INTERVAL_MIN 50
28
29 //카메라와 모터에 따라 최적화 필요한 값 --------------------------------
30 #define SERVO_MOTOR_VERTICAL_MIN 20
31 #define SERVO_MOTOR_VERTICAL_MAX 45
32 #define SERVO_MOTOR_VERTICAL_CENTER ((SERVO_MOTOR_VERTICAL_MIN + SERVO_MOTOR_VERTICAL_MAX) / 2)
33 #define SERVO_MOTOR_HORIZONTAL_MIN 30
34 #define SERVO_MOTOR_HORIZONTAL_MAX 75
35 #define SERVO_MOTOR_HORIZONTAL_CENTER ((SERVO_MOTOR_HORIZONTAL_MIN + SERVO_MOTOR_HORIZONTAL_MAX) / 2)
36
37 // 70CM 앞 물체가 화면의 서보모터 이동단위(1/20) 만큼 이동에 필요한 값 (실측)
38 #define SERVO_MOTOR_VERTICAL_STEP 1
39 #define SERVO_MOTOR_HORIZONTAL_STEP 1.25
40
41 #endif