mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-14 10:28:54 +00:00
257 lines
18 KiB
HTML
257 lines
18 KiB
HTML
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" data-whc_version="26.0">
|
||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="description" content="测试环境 硬件 开发板,或者 D211 的 FPGA 板 可转接摄像头的子板 摄像头,如 OV5640 软件 PC 端的串口终端软件,用于 PC 和开发板进行串口通信 DVP 模块的测试 demo:test_dvp 软件配置 配置 OV5640 摄像头 测试中需要用到摄像头,以 OV5640 为例,在 Luban 的根目录下通过 make kernel-menuconfig ,按如下选择: ..."/><meta name="DC.rights.owner" content="(C) 版权 2025"/><meta name="copyright" content="(C) 版权 2025"/><meta name="generator" content="DITA-OT"/><meta name="DC.type" content="concept"/><meta name="DC.contributor" content="yan.wang"/><meta name="DC.date.modified" content="2024-12-24"/><meta name="DC.format" content="HTML5"/><meta name="DC.identifier" content="dvp_test_guide"/><meta name="DC.language" content="zh-CN"/><title>测试指南</title><!-- Build number 2023110923. --><meta name="wh-path2root" content="../../../"/><meta name="wh-toc-id" content=""/><meta name="wh-source-relpath" content="topics/sdk/dvp/dvp_test.dita"/><meta name="wh-out-relpath" content="topics/sdk/dvp/dvp_test.html"/>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/commons.css?buildId=2023110923"/>
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/app/topic.css?buildId=2023110923"/>
|
||
|
||
<script src="../../../webhelp/app/options/properties.js?buildId=20250121171154"></script>
|
||
<script src="../../../webhelp/app/localization/strings.js?buildId=2023110923"></script>
|
||
<script src="../../../webhelp/app/search/index/keywords.js?buildId=20250121171154"></script>
|
||
<script defer="defer" src="../../../webhelp/app/commons.js?buildId=2023110923"></script>
|
||
<script defer="defer" src="../../../webhelp/app/topic.js?buildId=2023110923"></script>
|
||
<link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-styles-web.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/notes.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-common.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-images.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/footnote.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/aic-web-watermark.css?buildId=2023110923"/><link rel="stylesheet" type="text/css" href="../../../webhelp/template/topic-body-list.css?buildId=2023110923"/></head>
|
||
|
||
<body id="dvp_test_guide" class="wh_topic_page frmBody">
|
||
<a href="#wh_topic_body" class="sr-only sr-only-focusable">
|
||
跳转到主要内容
|
||
</a>
|
||
|
||
|
||
|
||
|
||
<header class="navbar navbar-default wh_header">
|
||
<div class="container-fluid">
|
||
<div class="wh_header_flex_container navbar-nav navbar-expand-md navbar-dark">
|
||
<div class="wh_logo_and_publication_title_container">
|
||
<div class="wh_logo_and_publication_title">
|
||
|
||
<a href="http://www.artinchip.com" class=" wh_logo d-none d-sm-block "><img src="../../../company-logo-white.png" alt="RTOS SDK 使用指南SDK 指南文件"/></a>
|
||
<div class=" wh_publication_title "><a href="../../../index.html"><span class="booktitle"><span class="ph mainbooktitle">RTOS SDK 使用指南</span><span class="ph booktitlealt">SDK 指南文件</span></span></a></div>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<div class="wh_top_menu_and_indexterms_link collapse navbar-collapse" id="wh_top_menu_and_indexterms_link">
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class=" wh_search_input navbar-form wh_topic_page_search search " role="form">
|
||
|
||
|
||
|
||
<form id="searchForm" method="get" role="search" action="../../../search.html"><div><input type="search" placeholder="搜索 " class="wh_search_textfield" id="textToSearch" name="searchQuery" aria-label="搜索查询" required="required"/><button type="submit" class="wh_search_button" aria-label="搜索"><span class="search_input_text">搜索</span></button></div></form>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="container-fluid" id="wh_topic_container">
|
||
<div class="row">
|
||
|
||
<nav class="wh_tools d-print-none navbar-expand-md" aria-label="Tools">
|
||
|
||
<div data-tooltip-position="bottom" class=" wh_breadcrumb "></div>
|
||
|
||
|
||
|
||
<div class="wh_right_tools">
|
||
<button class="wh_hide_highlight" aria-label="切换搜索突出显示" title="切换搜索突出显示"></button>
|
||
<button class="webhelp_expand_collapse_sections" data-next-state="collapsed" aria-label="折叠截面" title="折叠截面"></button>
|
||
|
||
|
||
|
||
|
||
<div class=" wh_print_link print d-none d-md-inline-block "><button onClick="window.print()" title="打印此页" aria-label="打印此页"></button></div>
|
||
|
||
|
||
</div>
|
||
|
||
</nav>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="wh_content_area">
|
||
<div class="row">
|
||
|
||
|
||
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-12" id="wh_topic_body">
|
||
|
||
<button id="wh_close_topic_toc_button" class="close-toc-button d-none" aria-label="Toggle topic table of content" aria-controls="wh_topic_toc" aria-expanded="true">
|
||
<span class="close-toc-icon-container">
|
||
<span class="close-toc-icon"></span>
|
||
</span>
|
||
</button>
|
||
|
||
<div class=" wh_topic_content body "><main role="main"><article class="- topic/topic concept/concept topic concept" role="article" aria-labelledby="ariaid-title1"><span class="edit-link" style="font-size:12px; opacity:0.6; text-align:right; vertical-align:middle"><a target="_blank" href="http://172.16.35.88/tasks/jdssno1uvvbf2mltu9kb9v3if05d5gopuakboe8hlud18rma/edit/F:/aicdita/aicdita-cn/topics/sdk/dvp/dvp_test.dita">Edit online</a></span><h1 class="- topic/title title topictitle1" id="ariaid-title1">测试指南</h1><div class="date inPage">24 Dec 2024</div><div style="color: gray;">
|
||
Read time: 2 minute(s)
|
||
</div><div class="- topic/body concept/conbody body conbody"><section class="- topic/section section" id="dvp_test_guide__section_bzy_ykt_2bc" data-ofbid="dvp_test_guide__section_bzy_ykt_2bc"><h2 class="- topic/title title sectiontitle">测试环境</h2>
|
||
|
||
<div class="- topic/p p" data-ofbid="d144696e27__20250121171610">
|
||
<ul class="- topic/ul ul" id="dvp_test_guide__ul_dsq_124_f1c" data-ofbid="dvp_test_guide__ul_dsq_124_f1c"><li class="- topic/li li" data-ofbid="d144696e30__20250121171610"><strong class="+ topic/ph hi-d/b ph b">硬件</strong><ul class="- topic/ul ul" id="dvp_test_guide__ul_vsk_dzg_d1c" data-ofbid="dvp_test_guide__ul_vsk_dzg_d1c"><li class="- topic/li li" data-ofbid="d144696e34__20250121171610">
|
||
<p class="- topic/p p" data-ofbid="d144696e36__20250121171610">开发板,或者 D211 的 FPGA 板</p>
|
||
</li><li class="- topic/li li" data-ofbid="d144696e39__20250121171610">
|
||
<p class="- topic/p p" data-ofbid="d144696e41__20250121171610">可转接摄像头的子板</p>
|
||
</li><li class="- topic/li li" data-ofbid="d144696e44__20250121171610">
|
||
<p class="- topic/p p" data-ofbid="d144696e46__20250121171610">摄像头,如 OV5640</p>
|
||
</li></ul></li><li class="- topic/li li" data-ofbid="d144696e49__20250121171610"><strong class="+ topic/ph hi-d/b ph b">软件</strong><ul class="- topic/ul ul" id="dvp_test_guide__ul_wsk_dzg_d1c" data-ofbid="dvp_test_guide__ul_wsk_dzg_d1c"><li class="- topic/li li" data-ofbid="d144696e53__20250121171610">
|
||
<p class="- topic/p p" data-ofbid="d144696e55__20250121171610">PC 端的串口终端软件,用于 PC 和开发板进行串口通信</p>
|
||
</li><li class="- topic/li li" data-ofbid="d144696e58__20250121171610">
|
||
<p class="- topic/p p" data-ofbid="d144696e60__20250121171610">DVP 模块的测试 demo:test_dvp</p>
|
||
</li></ul></li></ul>
|
||
</div></section><section class="- topic/section section" id="dvp_test_guide__section_xsk_dzg_d1c" data-ofbid="dvp_test_guide__section_xsk_dzg_d1c"><h2 class="- topic/title title sectiontitle">软件配置</h2>
|
||
|
||
<ol class="- topic/ol ol" id="dvp_test_guide__ol_is1_qzg_d1c" data-ofbid="dvp_test_guide__ol_is1_qzg_d1c"><li class="- topic/li li" id="dvp_test_guide__li_ccc_g34_f1c" data-ofbid="dvp_test_guide__li_ccc_g34_f1c">配置 OV5640 摄像头<div class="- topic/p p" data-ofbid="d144696e72__20250121171610">测试中需要用到摄像头,以 OV5640 为例,在
|
||
Luban 的根目录下通过 <span class="+ topic/keyword sw-d/cmdname keyword cmdname">make
|
||
kernel-menuconfig</span>,按如下选择:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="dvp_test_guide__pre_ysk_dzg_d1c" data-ofbid="dvp_test_guide__pre_ysk_dzg_d1c">Linux
|
||
Device Drivers
|
||
Multimedia support
|
||
Media ancillary drivers
|
||
Camera sensor devices
|
||
<*> OmniVision OV5640 sensor support
|
||
</pre></div><div class="- topic/p p" data-ofbid="d144696e79__20250121171610">在 <span class="+ topic/ph sw-d/filepath ph filepath">board.dts</span> 中,也需要增加
|
||
OV5640 的配置,假设 OV5640 是接在 I2C3
|
||
通道:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="dvp_test_guide__codeblock_l3h_rzg_d1c" data-ofbid="dvp_test_guide__codeblock_l3h_rzg_d1c">&i2c3 {
|
||
pinctrl-names = <span class="hl-string">"default"</span>;
|
||
pinctrl-<span class="hl-number">0</span> = <&i2c3_pins_a>, <&clk_out1_pins>; <em class="hl-comment">/* i2c3 引脚及 clock 引脚 */</em>
|
||
status = <span class="hl-string">"okay"</span>;
|
||
|
||
ov5640: camera@<span class="hl-number">3</span>C {
|
||
compatible = <span class="hl-string">"ovti,ov5640"</span>;
|
||
reg = <<span class="hl-number">0x3C</span>>;
|
||
clocks = <&cmu CLK_APB1>;
|
||
clock-names = <span class="hl-string">"xclk"</span>;
|
||
reset-gpios = <&gpio_p <span class="hl-number">5</span> GPIO_ACTIVE_LOW>;
|
||
powerdown-gpios = <&gpio_p <span class="hl-number">6</span> GPIO_ACTIVE_HIGH>;
|
||
|
||
port {
|
||
ov5640_out: endpoint {
|
||
remote-endpoint = <&dvp0_in>;
|
||
<em class="hl-comment">/* V4L2_FWNODE_BUS_TYPE_BT656
|
||
bus-type = <6>; */</em>
|
||
bus-width = <<span class="hl-number">8</span>>;
|
||
data-shift = <<span class="hl-number">2</span>>;
|
||
hsync-active = <<span class="hl-number">0</span>>;
|
||
vsync-active = <<span class="hl-number">1</span>>;
|
||
pclk-sample = <<span class="hl-number">1</span>>;
|
||
};
|
||
};
|
||
};
|
||
};</pre><div class="- topic/note note note note_note" id="dvp_test_guide__note_gzj_szg_d1c" data-ofbid="dvp_test_guide__note_gzj_szg_d1c"><span class="note__title">注:</span>
|
||
<ol class="- topic/ol ol" type="a" id="dvp_test_guide__ol_atk_dzg_d1c" data-ofbid="dvp_test_guide__ol_atk_dzg_d1c"><li class="- topic/li li" data-ofbid="d144696e89__20250121171610">
|
||
<p class="- topic/p p" data-ofbid="d144696e91__20250121171610">如果要使用 BT656 模式,请打开 bus-type 参数。</p>
|
||
</li><li class="- topic/li li" data-ofbid="d144696e94__20250121171610">
|
||
<p class="- topic/p p" data-ofbid="d144696e96__20250121171610">如果是 YUV422,不需要配置 bus-type,代码中默认采用 YUV422(即
|
||
V4L2_FWNODE_BUS_TYPE_PARALLEL,定义在
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">drivers/media/v4l2-core/v4l2-fwnode.c</span>)。</p>
|
||
</li></ol>
|
||
</div></div></li><li class="- topic/li li" data-ofbid="d144696e103__20250121171610">test_dvp 配置<p class="- topic/p p" data-ofbid="d144696e105__20250121171610">在 <span class="- topic/ph ph">Luban-Lite</span> 根目录,运行,按如下选择:</p><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="dvp_test_guide__pre_ctk_dzg_d1c" data-ofbid="dvp_test_guide__pre_ctk_dzg_d1c">ArtInChip packages
|
||
Sample code
|
||
[*] test-dvp
|
||
</pre></li></ol>
|
||
</section><section class="- topic/section section" id="dvp_test_guide__section_dtk_dzg_d1c" data-ofbid="dvp_test_guide__section_dtk_dzg_d1c"><h2 class="- topic/title title sectiontitle">test_dvp 测试</h2>
|
||
|
||
<p class="- topic/p p" data-ofbid="d144696e118__20250121171610">test_dvp 的主要功能是将摄像头的数据采集后,传给 DE 模块的 Video 图层去显示。</p>
|
||
<div class="- topic/p p" data-ofbid="d144696e121__20250121171610">在打开 test_dvp 的编译后,<span class="- topic/ph ph">板子上的 test_dvp 位于
|
||
<span class="+ topic/ph sw-d/filepath ph filepath">/usr/local/bin/</span>,无需进入该目录,</span>直接运行 test_dvp
|
||
即可:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="dvp_test_guide__codeblock_ztb_5zg_d1c" data-ofbid="dvp_test_guide__codeblock_ztb_5zg_d1c">test_dvp -u</pre><pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="dvp_test_guide__codeblock_usx_vcs_5dc" data-ofbid="dvp_test_guide__codeblock_usx_vcs_5dc">Usage: test_dvp [options]:
|
||
-f, --format format of input video, NV12/NV16 etc
|
||
-c, --count the number of capture frame
|
||
-w, --width the width of sensor
|
||
-h, --height the height of sensor
|
||
-r, --framerate the framerate of sensor
|
||
-u, --usage
|
||
-v, --verbose
|
||
|
||
Example: test_dvp -f nv16 -c <span class="hl-number">1</span>
|
||
</pre></div>
|
||
<div class="- topic/p p" data-ofbid="d144696e134__20250121171610">示例:设置摄像头的分辨率为 720*576,帧率为 15 帧/s,使用 NV12 格式(默认)输出到 Video Layer 显示,共采集并显示 100
|
||
帧数据:<pre class="+ topic/pre pr-d/codeblock pre codeblock language-c" id="dvp_test_guide__codeblock_bmf_wcs_5dc" data-ofbid="dvp_test_guide__codeblock_bmf_wcs_5dc">test_dvp -w <span class="hl-number">720</span> -h <span class="hl-number">576</span> -r <span class="hl-number">15</span> -c <span class="hl-number">100</span></pre></div>
|
||
</section></div></article></main></div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<nav role="navigation" id="wh_topic_toc" aria-label="On this page" class="col-lg-2 d-none d-lg-block navbar d-print-none">
|
||
<div id="wh_topic_toc_content">
|
||
|
||
<div class=" wh_topic_toc "><div class="wh_topic_label">在本页上</div><ul><li class="section-item"><div class="section-title"><a href="#dvp_test_guide__section_bzy_ykt_2bc" data-tocid="dvp_test_guide__section_bzy_ykt_2bc">测试环境</a></div></li><li class="section-item"><div class="section-title"><a href="#dvp_test_guide__section_xsk_dzg_d1c" data-tocid="dvp_test_guide__section_xsk_dzg_d1c">软件配置</a></div></li><li class="section-item"><div class="section-title"><a href="#dvp_test_guide__section_dtk_dzg_d1c" data-tocid="dvp_test_guide__section_dtk_dzg_d1c">test_dvp 测试</a></div></li></ul></div>
|
||
|
||
</div>
|
||
</nav>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
<footer class="navbar navbar-default wh_footer">
|
||
<div class=" footer-container mx-auto ">
|
||
<title>footer def</title>
|
||
<style><!--
|
||
|
||
.p1 {
|
||
font-family: FangZhengShuSong, Times, serif;
|
||
}
|
||
.p2 {
|
||
font-family: Arial, Helvetica, sans-serif;
|
||
}
|
||
.p3 {
|
||
font-family: "Lucida Console", "Courier New", monospace;
|
||
}
|
||
|
||
--></style>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="webhelp.fragment.footer">
|
||
<p class="p1">Copyright © 2019-2024 广东匠芯创科技有限公司. All rights reserved.</p>
|
||
</div><div>
|
||
<div class="generation_time">
|
||
Update Time: 2025-01-21
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
<div id="go2top" class="d-print-none">
|
||
<span class="oxy-icon oxy-icon-up"></span>
|
||
</div>
|
||
|
||
<div id="modal_img_large" class="modal">
|
||
<span class="close oxy-icon oxy-icon-remove"></span>
|
||
<div id="modal_img_container"></div>
|
||
<div id="caption"></div>
|
||
</div>
|
||
|
||
|
||
<script src="${pd}/publishing/publishing-styles-AIC-template/js/custom.js" defer="defer"></script>
|
||
|
||
|
||
</body>
|
||
</html> |