1 Star 0 Fork 0

wgu938 / no_fly_zone_detection

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

No-Fly Zone Detection

(Left: Binary mask; Mid: Original video; Right: Bitwise add result)

Preparation

To begin with, you need to install OpenCV and NumPy libraries to leverage powerful built-in functions such as cv2.VideoCapture (for video loading) and cv2.inRange() (for mask creation).

Using conda as a package management tool is strongly recommended for installing OpenCV. Conda simplifies package management, dependency handling, and environment management, ensuring streamlined workflows and reproducibility.

Step 1: Install Miniconda3

Please download the appropriate installer for your platform (Windows/Linux/macOS) from the official Miniconda documentation page and proceed with the installation based on the detailed instructions therein.

Step 2: Create a new Conda environment

Open a terminal and run:

conda create --name cv_env python=3.11

This will create a new Conda environment, namely cv_env, with python=3.11 installed.

Step 3: Activate the Conda environment

To view all the Conda environments on your PC, run:

(base) wgu@localhost ~ % conda env list
# conda environments:
#
base                  *  /Users/wgu/miniconda3
cv_env                   /Users/wgu/miniconda3/envs/cv_env

Here, cv_env is the new Conda environment that you created a few seconds ago. You can activate this Conda environment by running:

(base) wgu@localhost ~ % conda activate cv_env
(cv_env) wgu@localhost ~ % 

The (cv_env) prefix indicates the current environment you are using.

Note: You can create multiple Conda environments, each equipped with different versions of Python or other packages, to facilitate conflict-free development for distinct projects.

Step 4: Install OpenCV

conda install -c conda-forge opencv

You can verify the installation by running the following commands in the terminal, which check the OpenCV version:

(cv_env) wgu@localhost ~ % python
Python 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:49:36) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> print(cv2.__version__)
4.9.0

Step 5: Install NumPy

conda install numpy

File hierarchy

Under this repo, there are three files:

  • README.md: an instruction file
  • no_fly_zone_detection.py: a Python script for no-fly zone detection
  • no_fly_zone.mp4: a video for emulating the top-down view from a drone flying over an urban area in our final challenge contest

Task and the deliverable

  • Implement the def red_hsv(hsv_img): function in no_fly_zone_detection.py to create a mask for thresholding the red color in HSV color space
  • Run the script with your implementation and evaluate its performance
  • Upload a report in PDF, including your code implementation and results (i.e., original image vs. detected image)

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weibin93/no_fly_zone_detection.git
git@gitee.com:weibin93/no_fly_zone_detection.git
weibin93
no_fly_zone_detection
no_fly_zone_detection
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891