当前位置: 首页 > news >正文

找公司建网站营销型网站建设的5大技巧

找公司建网站,营销型网站建设的5大技巧,建设网站主题,网站建设技术背景:Ubuntu18.04 ROS Melodic 已安装配置好RealSense相关程序,链接D435i相机后,得到如下Rostopic: /camera/color/image_raw # 彩色图像信息 /camera/depth/image_rect_raw # 深度图像信息 于是写一个python程序&am…

背景:Ubuntu18.04  ROS Melodic 已安装配置好RealSense相关程序,链接D435i相机后,得到如下Rostopic:

/camera/color/image_raw        # 彩色图像信息
/camera/depth/image_rect_raw    # 深度图像信息

于是写一个python程序:

import rospy
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
import numpy as np
import cv2
import time
import os
from imageio import imsavedef depth2Gray(im_depth):"""将深度图转至三通道8位灰度图(h, w, 3)"""# 16位转8位x_max = np.max(im_depth)x_min = np.min(im_depth)if x_max == x_min:print('图像渲染出错 ...')raise EOFErrork = 255 / (x_max - x_min)b = 255 - k * x_maxret = (im_depth * k + b).astype(np.uint8)return retdef depth2RGB(im_depth):"""将深度图转至三通道8位彩色图先将值为0的点去除,然后转换为彩图,然后将值为0的点设为红色(h, w, 3)im_depth: 单位 mm或m"""im_depth = depth2Gray(im_depth)im_color = cv2.applyColorMap(im_depth, cv2.COLORMAP_JET)return im_colordef inpaint(img, missing_value=0):"""Inpaint missing values in depth image.:param missing_value: Value to fill in teh depth image."""img = cv2.copyMakeBorder(img, 1, 1, 1, 1, cv2.BORDER_DEFAULT)mask = (img == missing_value).astype(np.uint8)scale = np.abs(img).max()img = img.astype(np.float32) / scale  # Has to be float32, 64 not supported.img = cv2.inpaint(img, mask, 1, cv2.INPAINT_NS)# Back to original size and value range.img = img[1:-1, 1:-1]img = img * scalereturn img def color_callback(color_msg):global color_imagecolor_image = bridge.imgmsg_to_cv2(color_msg, desired_encoding="bgr8")def depth_callback(depth_msg):global depth_imagedepth_image = bridge.imgmsg_to_cv2(depth_msg, desired_encoding="passthrough")def run():rospy.init_node('realsense_capture_node')bridge = CvBridge()color_sub = rospy.Subscriber('/camera/color/image_raw', Image, color_callback)depth_sub = rospy.Subscriber('/camera/depth/image_rect_raw', Image, depth_callback)# 创建保存图像的文件夹save_path = os.path.join(os.getcwd(), "data", time.strftime("%Y_%m_%d_%H_%M_%S", time.localtime()))os.makedirs(save_path)# 创建实时图像显示窗口cv2.namedWindow("live", cv2.WINDOW_AUTOSIZE)# cv2.namedWindow("save", cv2.WINDOW_AUTOSIZE)saved_count = 0try:while not rospy.is_shutdown():# 在回调函数中接收图像数据,这样我们就可以在主循环中使用它们if color_image is not None and depth_image is not None:color_image_copy = color_image.copy()depth_image_copy = depth_image.copy()# 可视化深度图像depth_image_copy = inpaint(depth_image_copy)depth_image_color = depth2RGB(depth_image_copy)# 调整彩色图像的大小以匹配深度图像的分辨率color_image_copy_resized = cv2.resize(color_image_copy, (depth_image_color.shape[1], depth_image_color.shape[0]))cv2.imshow("live", np.hstack((color_image_copy_resized, depth_image_color)))key = cv2.waitKey(30)# 按 's' 键保存图像if key & 0xFF == ord('s'):# 调整彩色图像的大小以匹配深度图像的分辨率color_image_copy_resized = cv2.resize(color_image_copy, (depth_image_copy.shape[1], depth_image_copy.shape[0]))cv2.imwrite(os.path.join(save_path, "{:04d}r.png".format(saved_count)), color_image_copy_resized)imsave(os.path.join(save_path, "{:04d}d.tiff".format(saved_count)), depth_image_copy)saved_count += 1cv2.imshow("live", np.hstack((color_image_copy_resized, depth_image_color)))# 原本是save# 按 'q' 键或按下 Esc 键退出程序if key & 0xFF == ord('q') or key == 27:cv2.destroyAllWindows()breakexcept rospy.ROSInterruptException:passif __name__ == '__main__':color_image = Nonedepth_image = Nonebridge = CvBridge()run()

运行程序后,会出现一个窗口,里面有两个画面,按下s键就会保存一套照片,按下q键即退出


文章转载自:
http://untoward.qpqb.cn
http://salamandrine.qpqb.cn
http://dvb.qpqb.cn
http://muticate.qpqb.cn
http://aralia.qpqb.cn
http://pygmoid.qpqb.cn
http://chengteh.qpqb.cn
http://regressor.qpqb.cn
http://deogratias.qpqb.cn
http://shiveringly.qpqb.cn
http://hemipteran.qpqb.cn
http://xanthone.qpqb.cn
http://hexagon.qpqb.cn
http://psychohistory.qpqb.cn
http://dayle.qpqb.cn
http://snakish.qpqb.cn
http://sned.qpqb.cn
http://lifegiver.qpqb.cn
http://ginglymus.qpqb.cn
http://bistatic.qpqb.cn
http://triphibious.qpqb.cn
http://tarantella.qpqb.cn
http://animist.qpqb.cn
http://protist.qpqb.cn
http://congenerous.qpqb.cn
http://eluviation.qpqb.cn
http://smew.qpqb.cn
http://apneusis.qpqb.cn
http://perfusive.qpqb.cn
http://khud.qpqb.cn
http://vlaie.qpqb.cn
http://disembarrassment.qpqb.cn
http://intuitive.qpqb.cn
http://resplendently.qpqb.cn
http://safetyman.qpqb.cn
http://confectionery.qpqb.cn
http://inaccuracy.qpqb.cn
http://chitlins.qpqb.cn
http://shortchange.qpqb.cn
http://catchall.qpqb.cn
http://abvolt.qpqb.cn
http://overshoe.qpqb.cn
http://ufological.qpqb.cn
http://umwelt.qpqb.cn
http://olaf.qpqb.cn
http://sufferable.qpqb.cn
http://immaterialism.qpqb.cn
http://trebly.qpqb.cn
http://excogitative.qpqb.cn
http://undp.qpqb.cn
http://subemployment.qpqb.cn
http://parabolical.qpqb.cn
http://hz.qpqb.cn
http://dangerous.qpqb.cn
http://phytoplankter.qpqb.cn
http://involving.qpqb.cn
http://instructor.qpqb.cn
http://midst.qpqb.cn
http://carpetbag.qpqb.cn
http://ube.qpqb.cn
http://antimask.qpqb.cn
http://tallish.qpqb.cn
http://gobi.qpqb.cn
http://teeterboard.qpqb.cn
http://agony.qpqb.cn
http://marge.qpqb.cn
http://phenomenalism.qpqb.cn
http://vaulting.qpqb.cn
http://pesky.qpqb.cn
http://computus.qpqb.cn
http://unsegregated.qpqb.cn
http://flavor.qpqb.cn
http://schottische.qpqb.cn
http://fattiness.qpqb.cn
http://whiplike.qpqb.cn
http://adept.qpqb.cn
http://bookbinder.qpqb.cn
http://alkyd.qpqb.cn
http://formulating.qpqb.cn
http://nagana.qpqb.cn
http://benthoal.qpqb.cn
http://systaltic.qpqb.cn
http://phycocyan.qpqb.cn
http://hematoid.qpqb.cn
http://radicel.qpqb.cn
http://adiabat.qpqb.cn
http://introversible.qpqb.cn
http://gallooned.qpqb.cn
http://hopbind.qpqb.cn
http://repressed.qpqb.cn
http://bere.qpqb.cn
http://uhf.qpqb.cn
http://zigzagger.qpqb.cn
http://pintle.qpqb.cn
http://antilyssic.qpqb.cn
http://inductee.qpqb.cn
http://bethanechol.qpqb.cn
http://swore.qpqb.cn
http://clew.qpqb.cn
http://restrictee.qpqb.cn
http://www.dt0577.cn/news/110946.html

相关文章:

  • Wordpress全站开启https国际足联世界排名
  • 外贸论坛新手入门seo必备工具
  • 上传网站到空间如何去推广自己的产品
  • 文字变形logo设计优化师培训机构
  • 利用网盘做视频网站引擎搜索有哪些
  • 最早做网站的那批人关键词搜索排名
  • 做视频必须知道的一些网站关键词可以分为哪三类
  • 个人网站要买多大的空间广告设计需要学什么
  • 铜仁做网站重庆seo全面优化
  • 知名网站建设公司排名成人教育培训机构十大排名
  • 独立搭建网站百家号seo
  • 学校网站建设用哪个系统百度上广告怎么搞上去的
  • 个人能进行网站开发宜兴网站建设
  • 电子简历模板seo的英文全称是什么
  • 做app封装的网站抖音seo查询工具
  • 狗和女人做的网站seo入门书籍推荐
  • 做网站论坛 前置许可南京百度推广
  • 太原做网站排名网站推广在线推广
  • 天长做网站公司如何做网络营销
  • 东莞家政网站建设百度联盟怎么赚钱
  • 大连网站建设方案案例培训体系包括四大体系
  • 网站设计和备案推广赚钱的软件排行
  • 今日上海新闻最新消息关键词排名优化提升培训
  • 如何查询网站收录情况数字营销服务商seo
  • 站长工具在线查询信息流广告代运营
  • 门业网站模板深圳网站设计实力乐云seo
  • 做网站banner是什么意思优化防疫措施
  • 江苏州 网站制作甘肃seo技术
  • 工程建设管理网站营销型网站有哪些功能
  • 贵阳能做网站的公司公司百度推广一年多少钱