更新版本号:v1.1.1

This commit is contained in:
dengwenjie
2025-12-31 11:28:06 +08:00
parent bc2a9f11ad
commit 1fbd8779b9
18 changed files with 28 additions and 28 deletions

View File

@@ -12,7 +12,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<smartjavaai.version>1.1.0</smartjavaai.version>
<smartjavaai.version>1.1.1</smartjavaai.version>
<!--如果打包运行需要替换成你的main-->
<exec.mainClass>smartai.examples.vision.ObjectDetectionDemo</exec.mainClass>

View File

@@ -205,13 +205,16 @@ public class ObjectDetectionDemo {
*/
@Test
public void testStream(){
StreamDetector detector = new StreamDetector.Builder()
//视频源类型:支持视频流、本地摄像头、视频文件
.sourceType(VideoSourceType.STREAM)
//视频流地址支持rtsp、rtmp、http等常见视频流
.streamUrl("rtsp://username:password@ip:port/Streaming/Channels/101")
.streamUrl("rtsp://127.0.0.1:8554/stream")
//每隔多少帧检测一次(需要根据模型检测速度决定)
.frameDetectionInterval(10)
//是否打印调试日志
.enableDebugLog(false)
//目标检测模型
.detectorModel(getModel())
//回调函数检测到指定目标时触发getModel中可指定模型检测的物体
@@ -246,6 +249,7 @@ public class ObjectDetectionDemo {
}
}).build();
detector.startDetection();
//阻塞主线程
CountDownLatch latch = new CountDownLatch(1);
try {
@@ -319,8 +323,6 @@ public class ObjectDetectionDemo {
.frameDetectionInterval(5)
//目标检测模型
.detectorModel(getModel())
//同物体重复检测时间间隔单位s
.repeatGap(5)
//回调函数检测到指定目标时触发getModel中可指定模型检测的物体
.listener(new StreamDetectionListener() {
@Override