This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import os | |
def load_images(image_dir): | |
batch = np.empty((0, 224, 224, 3), dtype=np.float32) | |
for image_name in os.listdir(image_dir)[:]: | |
img_path = image_dir + "/" + image_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
g++ server.cc -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio -o server | |
g++ client.cc -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio -o client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
H264包含多個NAL Unit | |
NAL Unit: | |
由 00 00 00 01開頭, 分為SPS, PPS, IFrame與PFrame | |
通常h264檔案內容會以SPS PPS IFrame...的方式排序 | |
00 00 00 01接著是NAL Unit的類型, 可以用來判斷一個NAL Unit的類型 | |
67: SPS | |
68: PPS | |
65: IFrame |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate root CA | |
openssl req -newkey rsa:2048 -nodes -keyout root-key.pem -x509 -days 365 -out root-ca.pem | |
# Generate leaf CSR | |
openssl req -new -newkey rsa:2048 -nodes -keyout leaf-key.pem -out leaf-csr.pem | |
# Generate leaf CA | |
openssl x509 -req -days 3650 -in leaf-csr.pem \ | |
-CA root-ca.pem -CAkey root-key.pem \ | |
-CAcreateserial -out leaf-ca.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM amd64/ubuntu:xenial | |
MAINTAINER courant | |
RUN apt-get update -y | |
RUN apt-get install -y git g++ cmake curl pkg-config python libtool libtool-bin automake flex bison | |
RUN git clone https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp.git | |
RUN cd /amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build && echo "y" | ./install-script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM arm64v8/ubuntu:xenial | |
MAINTAINER courant | |
RUN apt-get update -y | |
RUN apt-get install -y build-essential checkinstall -y cmake pkg-config yasm \ | |
libjpeg8-dev libjasper-dev libpng12-dev \ | |
libtiff5-dev \ | |
libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev \ | |
libxine2-dev libv4l-dev \ |
NewerOlder