提交 07773efd authored 作者: blu's avatar blu

init

上级 d9af5216
openapi: '3.0.0'
info:
title: Event Video Sevice API
version: '1.0.0'
paths:
/upload/evtvideos/{cameraId}:
post:
summary: upload event videos to cloud storage after slice and merge operations
tags: [upload]
requestBody:
description: |
upload files once to avoid maintaining states between requests.
note: ref to https://swagger.io/specification for more info about multiple files upload
required: true
content:
multipart/form-data:
schema:
properties:
files:
type: array
items:
type: string
format: binary
parameters:
- in: path
name: cameraId
description: 'camera identifier'
required: true
schema:
type: string
example: 'C90840818'
- in: query
name: startTime
description: 'start time as epoch in seconds, TZ used is GMT(UTC)'
required: true
schema:
type: integer
example: 1563937933
- in: query
name: endTime
description: 'end time as epoch in seconds, TZ used is GMT(UTC)'
required: true
schema:
type: integer
example: 1563938933
- in: query
name: headOffset
description: time in seconds to ignore for the first video file from left
required: true
schema:
type: integer
example: 150
- in: query
name: tailOffset
description: time in seconds to ignore for the last video file from right
required: true
schema:
type: integer
example: 60
responses:
'200':
description: OK
/query/evtvideos/{cameraId}:
get:
summary: query event videos that being within or overlapping with the time window [startTime, endTime]
tags: [query]
parameters:
- in: path
name: cameraId
description: 'camera identity'
required: true
schema:
type: string
example: 'C90840818'
- in: query
name: startTime
description: 'start time as epoch in seconds, TZ used is GMT(UTC)'
required: true
schema:
type: integer
example: 1563937933
- in: query
name: endTime
description: 'end time as epoch in seconds, TZ used is GMT(UTC). 0: now; SAME_AS_startTime: expect only one video with this start time'
required: false
schema:
type: integer
default: 0
example: 1563937933
responses:
'200':
description: list of meta objects for event videos since startTime of camera with id cameraId
content:
application/json:
schema:
type: array
items:
type: object
properties:
startTime:
type: integer
description: start time as epoch in seconds, TZ as UTC.
example: 1563937933
endTime:
type: integer
description: end time as epoch in seconds, TZ as UTC.
example: 1563938933
url:
type: string
description: azure storage url of this event video
example: https://ils-azure-storage/bucketid_path_to_video.mp4
\ No newline at end of file
CC = g++
CFLAGS = -g -Wall -std=c++11
src1 = prog1.cpp
prog1 = prog1
OPENCV = `pkg-config opencv --cflags --libs`
LIBS = $(OPENCV)
$(prog1):$(src1)
$(CC) $(CFLAGS) -o $(prog1) $(src1) $(LIBS)
\ No newline at end of file
#include <opencv2/opencv.hpp>
using namespace cv;
int main( int argc, char** argv )
{
char* imageName = argv[1];
Mat image;
image = imread( imageName, IMREAD_COLOR );
if( argc != 2 || !image.data ) {
printf( " No image data \n " );
return -1;
}
Mat gray_image;
cvtColor( image, gray_image, COLOR_BGR2GRAY );
imwrite( "Gray_Image.jpg", gray_image );
namedWindow( imageName, WINDOW_AUTOSIZE );
namedWindow( "Gray image", WINDOW_AUTOSIZE );
imshow( imageName, image );
imshow( "Gray image", gray_image );
waitKey(0);
return 0;
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论