mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-24 21:18:30 +03:00
Remove trailing whitespace
This commit is contained in:
parent
56b9c754f5
commit
cc30afcf0a
24
Dockerfile
24
Dockerfile
@ -1,21 +1,21 @@
|
|||||||
FROM ubuntu:16.04
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
# Install system packages
|
# Install system packages
|
||||||
RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y python3 \
|
RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y python3 \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python-pil \
|
python-pil \
|
||||||
python-lxml \
|
python-lxml \
|
||||||
python-tk \
|
python-tk \
|
||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
git \
|
git \
|
||||||
libgtk2.0-dev \
|
libgtk2.0-dev \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
libavcodec-dev \
|
libavcodec-dev \
|
||||||
libavformat-dev \
|
libavformat-dev \
|
||||||
libswscale-dev \
|
libswscale-dev \
|
||||||
libtbb2 \
|
libtbb2 \
|
||||||
libtbb-dev \
|
libtbb-dev \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libtiff-dev \
|
libtiff-dev \
|
||||||
@ -36,9 +36,9 @@ RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y python3
|
|||||||
libc++-dev \
|
libc++-dev \
|
||||||
libc++abi-dev \
|
libc++abi-dev \
|
||||||
build-essential \
|
build-essential \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install core packages
|
# Install core packages
|
||||||
RUN wget -q -O /tmp/get-pip.py --no-check-certificate https://bootstrap.pypa.io/get-pip.py && python3 /tmp/get-pip.py
|
RUN wget -q -O /tmp/get-pip.py --no-check-certificate https://bootstrap.pypa.io/get-pip.py && python3 /tmp/get-pip.py
|
||||||
RUN pip install -U pip \
|
RUN pip install -U pip \
|
||||||
numpy \
|
numpy \
|
||||||
@ -72,7 +72,7 @@ RUN cd /usr/local/src/ \
|
|||||||
&& rm 4.0.1.zip \
|
&& rm 4.0.1.zip \
|
||||||
&& cd /usr/local/src/opencv-4.0.1/ \
|
&& cd /usr/local/src/opencv-4.0.1/ \
|
||||||
&& mkdir build \
|
&& mkdir build \
|
||||||
&& cd /usr/local/src/opencv-4.0.1/build \
|
&& cd /usr/local/src/opencv-4.0.1/build \
|
||||||
&& cmake -D CMAKE_INSTALL_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local/ .. \
|
&& cmake -D CMAKE_INSTALL_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local/ .. \
|
||||||
&& make -j4 \
|
&& make -j4 \
|
||||||
&& make install \
|
&& make install \
|
||||||
|
|||||||
@ -57,7 +57,7 @@ class PreppedQueueProcessor(threading.Thread):
|
|||||||
|
|
||||||
# should this be a region class?
|
# should this be a region class?
|
||||||
class FramePrepper(threading.Thread):
|
class FramePrepper(threading.Thread):
|
||||||
def __init__(self, camera_name, shared_frame, frame_time, frame_ready,
|
def __init__(self, camera_name, shared_frame, frame_time, frame_ready,
|
||||||
frame_lock,
|
frame_lock,
|
||||||
region_size, region_x_offset, region_y_offset, region_threshold,
|
region_size, region_x_offset, region_y_offset, region_threshold,
|
||||||
prepped_frame_queue):
|
prepped_frame_queue):
|
||||||
@ -83,12 +83,12 @@ class FramePrepper(threading.Thread):
|
|||||||
# if there isnt a frame ready for processing or it is old, wait for a new frame
|
# if there isnt a frame ready for processing or it is old, wait for a new frame
|
||||||
if self.frame_time.value == frame_time or (now - self.frame_time.value) > 0.5:
|
if self.frame_time.value == frame_time or (now - self.frame_time.value) > 0.5:
|
||||||
self.frame_ready.wait()
|
self.frame_ready.wait()
|
||||||
|
|
||||||
# make a copy of the cropped frame
|
# make a copy of the cropped frame
|
||||||
with self.frame_lock:
|
with self.frame_lock:
|
||||||
cropped_frame = self.shared_frame[self.region_y_offset:self.region_y_offset+self.region_size, self.region_x_offset:self.region_x_offset+self.region_size].copy()
|
cropped_frame = self.shared_frame[self.region_y_offset:self.region_y_offset+self.region_size, self.region_x_offset:self.region_x_offset+self.region_size].copy()
|
||||||
frame_time = self.frame_time.value
|
frame_time = self.frame_time.value
|
||||||
|
|
||||||
# convert to RGB
|
# convert to RGB
|
||||||
cropped_frame_rgb = cv2.cvtColor(cropped_frame, cv2.COLOR_BGR2RGB)
|
cropped_frame_rgb = cv2.cvtColor(cropped_frame, cv2.COLOR_BGR2RGB)
|
||||||
# Resize to 300x300 if needed
|
# Resize to 300x300 if needed
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user