# 概述

## 计算机视觉

计算机视觉（CV）是让设备变得智能的关键技术。

计算机视觉技术用于不同的领域和用例，例如智能手机、机器人、IoT、汽车等。

一些用例（包括但不限于）是：

- 图像处理
- 图像转换
- 运动和目标跟踪
- 目标检测
- 特征检测
- 色彩转换

## OpenCV

- OpenCV（开源计算机视觉库：[http://opencv.org](http://opencv.org)）是世界上最大的计算机视觉库。
- 它是开源的，包含 2500 多种算法，由非营利性 Open Source Vision Foundation 运营。
- 它易于构建、开放可用，并且易于在任何平台上集成。
- OpenCV 是面向开发人员的 API，使开发人员可以无缝利用基于 OpenCV 的现有应用程序并将其移植到 Qualcomm Snapdragon 平台。

|  | 支持的 OpenCV 版本 | 当前实现 |
| --- | --- | --- |
| 当前发行版本 | OpenCV 4.11 | CPU 和 FastCV |

## FastCV

- FastCV 库为 Qualcomm 专有，与其他 CV 库相比，它可以在各种硬件上更快地实现 CV 算法。
- 这些 API 允许用户在硬件上加速 FastCV 功能。
- 它为计算机视觉应用程序开发人员提供了两个主要功能：

    - 经过优化的 CV 函数库，可在 Qualcomm 硬件上高效运行。
    - 干净的、与处理器无关的硬件加速 API

## 使用 FastCV 进行 OpenCV 加速

- 以 FastCV 为后端提供 OpenCV API 加速，以提供更好的性能。
- OpenCV 功能通过基于 FastCV 的扩展 API 得到增强，早期版本中没有这些 API，仅包含默认的 OpenCV 库。
- eSDK 提供了一种使用 OpenCV API 和自动工具构建 CV 应用程序的简单方法。
- 可以使用默认的 OpenCV API 来开发 CV 应用程序。OpenCV 库调用 FastCV HAL API，然后调用 FastCV 算法。
- 查看[支持的 API](https://docs.qualcomm.com/doc/80-70020-21SC/topic/fastcv-acceleration.html#supported-opencv-apis)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export cv-block-diagram.svg cv-block-diagram -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" width="8.51563in" height="2.07292in" viewbox="0 0 613.125 149.25" xml:space="preserve" color-interpolation-filters="sRGB" class="st10" aria-label="../_images/cv-block-diagram.svg" svgdefaultwidth="694"><style>.svg-1 .st1 { fill: #fafafa; stroke: #d2d7e1; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st2 { fill: #6280cc; stroke: #6280cc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st3 { fill: #ffffff; font-family: Calibri; font-size: 1.16666em }
.svg-1 .st4 { font-family: SimHei; font-size: 1em }
.svg-1 .st5 { fill: #ffffff; font-family: SimHei; font-size: 1.16666em }
.svg-1 .st6 { font-family: Calibri; font-size: 1em }
.svg-1 .st7 { font-size: 1em }
.svg-1 .st8 { marker-end: url("#mrkr13-26"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st9 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.28409090909091 }
.svg-1 .st10 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend13">		<path d="M 3 1 L 0 0 L 3 -1 L 3 1 " style="stroke:none"></path>	</g>	<marker id="mrkr13-26" class="st9" refx="-10.56" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend13" transform="scale(-3.52,-3.52) "></use>	</marker></defs><g>	<title>cv-block-diagram</title>	<g id="shape10-1" transform="translate(18,-18)">		<title>Rectangle.8</title>		<rect x="0" y="36" width="577.125" height="113.25" rx="3.6" ry="3.6" class="st1"></rect>	</g>	<g id="shape1-3" transform="translate(31.125,-33.9375)">		<title>Sheet.1</title>		<desc>OpenCV 应用程序</desc>		<rect x="0" y="67.875" width="153" height="81.375" rx="4.5" ry="4.5" class="st2"></rect>		<text x="23.74" y="112.81" class="st3">OpenCV <tspan class="st4">应用程序</tspan></text>		</g>	<g id="shape2-7" transform="translate(230.625,-33.9375)">		<title>Sheet.2</title>		<desc>使用 FastCV HAL/扩展进行 OpenCV 加速</desc>		<rect x="0" y="67.875" width="153" height="81.375" rx="4.5" ry="4.5" class="st2"></rect>		<text x="41.56" y="95.81" class="st5">使用<tspan class="st6"> </tspan><tspan class="st6">FastCV </tspan><tspan x="34.44" dy="1.215em" class="st6">HAL/</tspan>扩展进行<tspan class="st6"> </tspan><tspan x="37.74" dy="1.215em" class="st6">OpenCV </tspan>加速</text>		</g>	<g id="shape3-15" transform="translate(430.125,-33.9375)">		<title>Sheet.3</title>		<desc>使用 FastCV 进行 硬件加速</desc>		<rect x="0" y="67.875" width="153" height="81.375" rx="4.5" ry="4.5" class="st2"></rect>		<text x="25.98" y="104.31" class="st5">使用<tspan class="st6"> </tspan><tspan class="st6">FastCV </tspan>进行 <tspan x="48.5" dy="1.215em" class="st7">硬件加速</tspan></text>		</g>	<g id="shape8-21" transform="translate(184.125,-74.4375)">		<title>Sheet.8</title>		<path d="M0 149.25 L35.94 149.25" class="st8"></path>	</g>	<g id="shape9-27" transform="translate(383.625,-74.4375)">		<title>Sheet.9</title>		<path d="M0 149.25 L35.94 149.25" class="st8"></path>	</g></g>
</svg>

**架构框图**

Last Published: Aug 12, 2025

[Previous Topic
机器视觉文档](https://docs.qualcomm.com/bundle/publicresource/80-70020-21SC/topics/vision.md) [Next Topic
运行现有测试应用](https://docs.qualcomm.com/bundle/publicresource/80-70020-21SC/topics/opencv-test-application.md)