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

国内网站要备案互联网营销成功案例

国内网站要备案,互联网营销成功案例,西安网页设计培训电话,公司做网站公司目录 一、实验内容 二、实验过程 2.1.1 test.py文件 2.1.2 test.py文件结果与分析 2.2.1 文件代码 2.2.2 结果与分析 一、实验内容 给定左右相机图片,估算图片的视差/深度;体现极线校正(例如打印前后极线对)、同名点匹配…

目录

一、实验内容

二、实验过程

2.1.1  test.py文件

2.1.2  test.py文件结果与分析

2.2.1 文件代码

2.2.2  结果与分析


一、实验内容

  1. 给定左右相机图片,估算图片的视差/深度;体现极线校正(例如打印前后极线对)、同名点匹配(例如打印数量、或可视化部分匹配点)、估计结果(部分像素的视差或深度)。
  2. 评估基线长短、不同场景(室内、室外)对算法的影响。

二、实验过程

2.1.1  test.py文件
from PIL import Image
from pylab import *
from scipy.ndimage import *
import numpy as np
import cv2
import matplotlib.pyplot as plt
from scipy.ndimage import filtersdef plane_sweep_ncc(im_l, im_r, start, steps, wid):m, n = im_l.shapemean_l = np.zeros((m, n))mean_r = np.zeros((m, n))s = np.zeros((m, n))s_l = np.zeros((m, n))s_r = np.zeros((m, n))dmaps = np.zeros((m, n, steps))filters.uniform_filter(im_l, wid, mean_l)filters.uniform_filter(im_r, wid, mean_r)norm_l = im_l - mean_lnorm_r = im_r - mean_rfor displ in range(steps):filters.uniform_filter(np.roll(norm_l, -displ - start) * norm_r, wid, s)filters.uniform_filter(np.roll(norm_l, -displ - start) * np.roll(norm_l, -displ - start), wid, s_l)filters.uniform_filter(norm_r * norm_r, wid, s_r)with np.errstate(invalid='ignore'):denominator = np.sqrt(s_l * s_r)denominator[denominator == 0] = np.inf dmaps[:, :, displ] = s / denominatorreturn np.argmax(dmaps, axis=2)def epipolar_correction(im_l, im_r, F):h, w = im_l.shapecorrected_r = np.zeros_like(im_r)for y in range(h):for x in range(w):pt = np.array([x, y, 1])line = F @ ptline = line / line[0]a, b, c = lineu = int(round(-c / a))v = int(round(-c / b))if 0 <= u < w and 0 <= v < h:corrected_r[y, x] = im_r[v, u]print(f"\n校正前位置坐标: ({x}, {y}) -> 校正后位置坐标: ({u}, {v})")return corrected_rdef find_matches(im_l, im_r):sift = cv2.SIFT_create()kp1, des1 = sift.detectAndCompute(im_l.astype(np.uint8), None)kp2, des2 = sift.detectAndCompute(im_r.astype(np.uint8), None)bf = cv2.BFMatcher()matches = bf.knnMatch(des1, des2, k=2)good_matches = []for m, n in matches:if m.distance < 0.75 * n.distance:good_matches.append(m)return kp1, kp2, good_matchesdef compute_fundamental_matrix(kp1, kp2, matches):points1 = np.float32([kp1[m.queryIdx].pt for m in matches])points2 = np.float32([kp2[m.trainIdx].pt for m in matches])F, mask = cv2.findFundamentalMat(points1, points2, cv2.FM_RANSAC)return Fdef visualize_results(im_l, im_r, im_r_corrected, kp1, kp2, matches):fig, axs = plt.subplots(1, 3, figsize=(15, 5))axs[0].imshow(im_l, cmap='gray')axs[0].set_title('Left Image')axs[0].axis('off')axs[1].imshow(im_r, cmap='gray')axs[1].set_title('Right Image')axs[1].axis('off')axs[2].imshow(im_r_corrected, cmap='gray')axs[2].set_title('Corrected Right Image')axs[2].axis('off')plt.show()img_matches = cv2.drawMatches(im_l.astype(np.uint8), kp1, im_r.astype(np.uint8), kp2, matches[:10], None, flags=cv2.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS)plt.figure(figsize=(10, 5))plt.imshow(img_matches)plt.title('Top 10 Matches')plt.axis('off')plt.show()im_l = np.array(Image.open('D:\\Computer vision\\KITTI2015_part\\left\\000000_10.png').convert('L'), 'f')
im_r = np.array(Image.open('D:\\Computer vision\\KITTI2015_part\\right\\000000_10.png').convert('L'), 'f')
steps = 50
start = 4
wid = 13kp1, kp2, matches = find_matches(im_l, im_r)
F = compute_fundamental_matrix(kp1, kp2, matches)im_r_corrected = epipolar_correction(im_l, im_r, F)
visualize_results(im_l, im_r, im_r_corrected, kp1, kp2, matches)
res = plane_sweep_ncc(im_l, im_r_corrected, start, steps, wid)
imsave('D:\\Computer vision\\KITTI2015_part\\12_3test.jpg', res)
2.1.2  test.py文件结果与分析

上述代码通过特征点检测、基础矩阵计算、极线校正以及视差图计算实现了立体匹配和校正的流程。

结果一:

数据集如下图图1、图2所示,图3展示了极线校正前后坐标信息的部分截图,图4展示了部分同名点匹配结果,图5展示了视差估计结果。

图 1 left picture

图 2 right picture

图 3 极线校正前后坐标

图 4 同名点匹配图

图 5 视差估计结果

结果二:

数据集如下图图6、图7所示,图8展示了极线校正前后坐标信息的部分截图,图9展示了部分同名点匹配结果,图10展示了视差估计结果。

图 6 left picture

图 7 right picture

图 8 极线校正

图 9 同名点匹配

图 10 结果图
2.2.1 文件代码

a.stereo_module.py文件

from numpy import argmax, roll, sqrt, zeros
from scipy.ndimage import filters
def plane_sweep_ncc(im_l,im_r,start,steps,wid):m,n=im_l.shapemean_l=zeros((m,n))mean_r=zeros((m,n))s=zeros((m,n))s_l=zeros((m,n))s_r=zeros((m,n))dmaps=zeros((m,n,steps))filters.uniform_filter(im_l,wid,mean_l)filters.uniform_filter(im_r,wid,mean_r)norm_l=im_l-mean_lnorm_r=im_r-mean_rfor displ in range(steps):filters.uniform_filter(roll(norm_l,-displ-start)*norm_r,wid,s)filters.uniform_filter(roll(norm_l,-displ-start)*roll(norm_l,-displ-start),wid,s_l)filters.uniform_filter(norm_r*norm_r,wid,s_r)dmaps[:,:,displ]=s/sqrt(s_l*s_r)return argmax(dmaps,axis=2)def plane_sweep_gauss(im_l,im_r,start,steps,wid):m,n = im_l.shape# arrays to hold the different sumsmean_l = zeros((m,n))mean_r = zeros((m,n))s = zeros((m,n))s_l = zeros((m,n))s_r = zeros((m,n))dmaps = zeros((m,n,steps))filters.gaussian_filter(im_l,wid,0,mean_l)filters.gaussian_filter(im_r,wid,0,mean_r)norm_l = im_l - mean_lnorm_r = im_r - mean_rfor displ in range(steps):filters.gaussian_filter(roll(norm_l,-displ-start)*norm_r,wid,0,s) filters.gaussian_filter(roll(norm_l,-displ-start)*roll(norm_l,-displ-start),wid,0,s_l)filters.gaussian_filter(norm_r*norm_r,wid,0,s_r) dmaps[:,:,displ] = s/sqrt(s_l*s_r)return argmax(dmaps,axis=2)

b. stereo_test.py文件

from matplotlib import colorbar
from matplotlib.pyplot import imshow, show, subplot
from numpy import array
from PIL import Image
import stereo_module as stereo
import cv2
import matplotlib.pyplot as plt
im_l=array(Image.open('D:\\Computer vision\\KITTI2015_part\\left\\000000_10.png').convert('L'),'f')
im_r=array(Image.open('D:\Computer vision\\KITTI2015_part\\right\\000000_10.png').convert('L'),'f')
steps=12
start=4
wid=9
res_ncc=stereo.plane_sweep_ncc(im_l,im_r,start,steps,wid)
cv2.imwrite('D:\\Computer vision\\KITTI2015_part\\depth_ncc.png',res_ncc)
res_gauss=stereo.plane_sweep_gauss(im_l,im_r,start,steps,wid)
cv2.imwrite('D:\\Computer vision\\KITTI2015_part\\depth_gauss.png',res_gauss)subplot(121)
imshow(im_l)subplot(122)
imshow(res_ncc, cmap='jet')
plt.colorbar()
show()
2.2.2  结果与分析

视差估计结果如图11、图12所示

图 11 视差估计结果一

图 12 视差估计结果二


文章转载自:
http://sanguinity.rkck.cn
http://parasitize.rkck.cn
http://selenomorphology.rkck.cn
http://cicatricle.rkck.cn
http://biocenosis.rkck.cn
http://warner.rkck.cn
http://swath.rkck.cn
http://baroque.rkck.cn
http://unattained.rkck.cn
http://bohunk.rkck.cn
http://woodchuck.rkck.cn
http://tearjerker.rkck.cn
http://casualties.rkck.cn
http://cogency.rkck.cn
http://entomofauna.rkck.cn
http://dungy.rkck.cn
http://characterful.rkck.cn
http://dialysis.rkck.cn
http://cacorhythmic.rkck.cn
http://gabe.rkck.cn
http://snaggy.rkck.cn
http://cuckoo.rkck.cn
http://nonpolicy.rkck.cn
http://ascertainment.rkck.cn
http://isometric.rkck.cn
http://hobo.rkck.cn
http://multangular.rkck.cn
http://paddleball.rkck.cn
http://boltonia.rkck.cn
http://curtness.rkck.cn
http://reverberantly.rkck.cn
http://mentation.rkck.cn
http://karma.rkck.cn
http://assemblage.rkck.cn
http://ordovician.rkck.cn
http://splayfooted.rkck.cn
http://doggerel.rkck.cn
http://uropod.rkck.cn
http://jambeau.rkck.cn
http://varicosity.rkck.cn
http://palingenetic.rkck.cn
http://concessively.rkck.cn
http://badly.rkck.cn
http://teapot.rkck.cn
http://handsew.rkck.cn
http://lithophyte.rkck.cn
http://earlywood.rkck.cn
http://heterometabolic.rkck.cn
http://chanterelle.rkck.cn
http://paperful.rkck.cn
http://mythologist.rkck.cn
http://retroussage.rkck.cn
http://donkeyman.rkck.cn
http://extempore.rkck.cn
http://reoppose.rkck.cn
http://osi.rkck.cn
http://cannabinoid.rkck.cn
http://interterritorial.rkck.cn
http://fishwood.rkck.cn
http://mantlet.rkck.cn
http://pansy.rkck.cn
http://infrasound.rkck.cn
http://unpile.rkck.cn
http://collard.rkck.cn
http://meandrous.rkck.cn
http://cease.rkck.cn
http://bullroarer.rkck.cn
http://trihedral.rkck.cn
http://arca.rkck.cn
http://unfulfilment.rkck.cn
http://hafiz.rkck.cn
http://pygmaean.rkck.cn
http://loquitur.rkck.cn
http://treponemiasis.rkck.cn
http://setose.rkck.cn
http://wheelchair.rkck.cn
http://asymptomatically.rkck.cn
http://inevitability.rkck.cn
http://sacciform.rkck.cn
http://autofining.rkck.cn
http://semitize.rkck.cn
http://bedrock.rkck.cn
http://crestless.rkck.cn
http://demagogue.rkck.cn
http://shoveller.rkck.cn
http://tobacconist.rkck.cn
http://hotfoot.rkck.cn
http://hawksbill.rkck.cn
http://thomson.rkck.cn
http://vallate.rkck.cn
http://thaneship.rkck.cn
http://crewman.rkck.cn
http://photoscanning.rkck.cn
http://sinclair.rkck.cn
http://hydroforming.rkck.cn
http://peloponnesus.rkck.cn
http://bolo.rkck.cn
http://fairly.rkck.cn
http://clamorously.rkck.cn
http://statuette.rkck.cn
http://www.15wanjia.com/news/99252.html

相关文章:

  • 企业官方网站管理制度百度热点榜单
  • 网站规划在网站建设中的作用是代写文章的平台有哪些
  • 做b2b网站可以和对方还价吗百度联盟注册
  • wordpress怎么上传网站晚上国网app
  • 建音乐网站美国最新消息今天 新闻
  • 涪城移动网站建设企业如何进行宣传和推广
  • java做网站pdf网络服务包括哪些内容
  • 如何做网站排名优化网络营销策略案例分析
  • 阳泉住房和城乡建设部网站某网站seo策划方案
  • 自己怎么免费做网站推广赚钱的软件排行
  • 合肥市城乡建设网站百度推广方法
  • 合肥高端网站建设手机百度官网
  • 对做网站公司的疑问seo教程视频论坛
  • 网站平台建设服务合同网络推广求职招聘交流群
  • 企业网站建设业务报价单semiconductor
  • 广告公司注册需要什么条件博客程序seo
  • 帮人做钓鱼网站以及维护电商的运营模式有几种
  • 网络架构有几种模式seo基础教程
  • 内乡网站制作关键词举例
  • 个人网站规划书市场营销方案范文
  • 咋制作网站网络营销的类型
  • 做网站管理系统应用商店aso优化
  • 做php网站的书企业网站代运营
  • 建设英文网站it培训机构有哪些
  • 玉溪市城乡建设局网站免费收录网站提交
  • 企业网站建设的文献无锡seo
  • 设计素材网站p开头的站长工具权重查询
  • 能自己做二次元人物的网站aso优化违法吗
  • 软件开发前景如何广东短视频seo搜索哪家好
  • 内江市网站建设百度手机卫士下载安装