找回密码
 立即注册
查看: 358|回复: 1

中级教程--(机器视觉)水域分割算法

[复制链接]

140

主题

15

回帖

816

积分

管理员

积分
816
发表于 2023-4-24 13:48:33 | 显示全部楼层 |阅读模式
水域分割又称Watershed变换,是模仿地图浸没过程的一种形态学分割算法,其本质是利用图像的区域特性来分割图像,它将边缘检测与区域生长的优点结合起来,能够得到单像素宽、连通、封闭确位置准确的轮廓,因此是应用比较广泛的一种图像分割方法。

启动:

手动方式:

hawkbot@hawkbot-ubuntu:~/catkin_ws$ roslaunch robot_vision watershed_segmentation.launch
... logging to /home/hawkbot/.ros/log/b1a8f776-e260-11ed-8599-218ddfb2e606/roslaunch-hawkbot-ubuntu-3407.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.100.238:39509/

SUMMARY
========

PARAMETERS
* /rosdistro: noetic
* /rosversion: 1.15.15
* /watershed_segmentation/debug_view: True
* /watershed_segmentation/queue_size: 3
* /watershed_segmentation/use_camera_info: False

NODES
  /
    watershed_segmentation (opencv_apps/watershed_segmentation)

ROS_MASTER_URI=http://127.0.0.1:11311

process[watershed_segmentation-1]: started with pid [3421]
[ INFO] [1682315030.499788566]: Initializing nodelet with 1 worker threads.
[ INFO] [1682315030.618005490]: This program demonstrates the famous watershed segmentation algorithm in OpenCV: watershed()
[ INFO] [1682315030.618055787]: Hot keys:
[ INFO] [1682315030.618074269]:         ESC - quit the program
[ INFO] [1682315030.618082885]:         r - restore the original image
[ INFO] [1682315030.618093175]:         w or SPACE - run watershed segmentation algorithm
[ INFO] [1682315030.618120400]:                 (before running it, *roughly* mark the areas to segment on the image)
[ INFO] [1682315030.618160933]:           (before that, roughly outline several markers on the image)





本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

0

主题

2

回帖

32

积分

新手上路

积分
32
发表于 2025-3-12 14:01:02 | 显示全部楼层
一直显示contours are empty是哪里有问题吗

浩克机器人

GMT+8, 2025-5-9 19:31 , Processed in 0.099570 second(s), 27 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表