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

织梦网站环境搭建找相似图片 识别

织梦网站环境搭建,找相似图片 识别,专业企业网站建设公司价格,邢台网站建设策划这种代码怎么写好,x1tx1 x2tx2 x1x2在一条线上tx2和tx1在一条线上输出x1 y1 ty1,x2 y2 ty2 线过的点 的集合 俯视图找深度 测试一下 目标 四条线变一条线 复杂度贼大跑起来贼慢 加了16000条 去重 for (const [x1, y1, x2, y2, lineId, type] of front…

这种代码怎么写好,x1==tx1 x2==tx2 x1x2在一条线上tx2和tx1在一条线上输出x1 y1 ty1,x2 y2 ty2

 

线过的点 的集合

俯视图找深度

测试一下 

目标

四条线变一条线

复杂度贼大跑起来贼慢

加了16000条

去重

for (const [x1, y1, x2, y2, lineId, type] of frontpointlist) {for (const [x3, y3, x4, y4, lineId2, type2] of toppointlist) {if (x1 === x3 && x2 === x4) {const drawline1=[x1, y1, y3 - clusterMinY, x2, y2, y3 - clusterMinY]const drawline2=[x1, y1, y4 - clusterMinY, x2, y2, y4 - clusterMinY]const key = drawline1.map(v => v.toFixed(2)).join(',');if (!seenLinePairs.has(key)) {seenLinePairs.add(key);lines3d.push([x1, y1, y3 - clusterMinY, x2, y2, y3 - clusterMinY, lineId, type]);}const key2 = drawline2.map(v => v.toFixed(2)).join(',');if (!seenLinePairs.has(key2)) {seenLinePairs.add(key2);lines3d.push([x1, y1, y4 - clusterMinY, x2, y2, y4 - clusterMinY, lineId, type]);}}}
}

上下分离

俯视图的拉伸需要旋转

yz调换

升天

俯视图z忘记归零了

多了4条线,不过问题不大,不影响生成面,生成面是要闭合环

经典缺线

分开判断看看

多这条线是不能容忍的

飞了

取x,x不一样

这条线不存在于俯视图

按x方向投

主视图侧视图投影线需要在俯视图里

for (const [x1, y1, x2, y2,lineId] of mostFrequentCluster.lines) {for (const [x3, y3, x4, y4,lineId2,type] of mostFrequentCluster.lines) {
if(x1<=x3 && x2>=x4 && y1<=y3 && y2>=y4 )
{frontpointlist.push([x3, y3, x4, y4,lineId2,type]);
frontpointmap .set([x3, y3,x4, y4], true);}}
}

200,0 

捕捉不到兀线

for (const [x1, y1, x2, y2, lineId, type] of toppointlist) {for (const [x3, y3, x4, y4, lineId2, type2] of frontpointlist){if (x1 === x3 && x2 === x4) {const drawline1=[x1, y3, y1 , x2, y3, y2];const drawline2=[x1, y4, y1 , x2, y4, y2];const key = drawline1.map(v => v.toFixed(2)).join(',');if (!seenLinePairs.has(key)) {seenLinePairs.add(key);//  lines3d.push([x1, y3, y1, x2, y3, y2, lineId, type]);}const key2 = drawline2.map(v => v.toFixed(2)).join(',');if (!seenLinePairs.has(key2)) {seenLinePairs.add(key2);//  lines3d.push([x1, y4, y1 , x2, y4, y2, lineId, type]);}}}}for (const [x1, y1, x2, y2, lineId, type] of rightpointlist) {for (const [x3, y3, x4, y4, lineId2, type2] of frontpointlist) {if (y1 === y3&& y2 === y4) {const drawline1=[x3, y1, x1, x3, y2, x2];const drawline2=[x4, y1, x1, x4, y2, x2];const key = drawline1.map(v => v.toFixed(2)).join(',');if (!seenLinePairs.has(key)) {seenLinePairs.add(key);lines3d.push([x3, y1, x1, x3, y2, x2 ,lineId, type]);}const key2 = drawline2.map(v => v.toFixed(2)).join(',');if (!seenLinePairs.has(key2)) {seenLinePairs.add(key2);lines3d.push([x4, y1, x1, x4, y2, x2, lineId, type]);}}}

没什么软用

for (const [x1, y1, x2, y2,lineId] of mostFrequentCluster.lines) {for (const [x3, y3, x4, y4,lineId2,type] of mostFrequentCluster.lines) {
if(x1<=x3 && x2>=x4 && y1<=y3 && y2>=y4 )
{frontpointlist.push([x3, y3, x4, y4,lineId2,type]);
frontpointmap .set(`${x3},${y3 }`, true);
frontpointmap .set(   `${x4},${y4}`, true);}}
}
for (const [x1, y1, x2, y2,lineId] of topcluauster.lines) {for (const [x3, y3, x4, y4,lineId2,type] of topcluauster.lines) {if(x1<=x3 && x2>=x4 && y1<=y3 && y2>=y4 )
{toppointlist.push([x3, y3- clusterMinY, x4, y4- clusterMinY,lineId2,type]);
toppointmap .set(`${x3},${y3- clusterMinY }`, true);
toppointmap .set(   `${x4},${y4- clusterMinY}`, true);
}}
}
for (const [x1, y1, x2, y2,lineId] of rightcluster.lines) {for (const [x3, y3, x4, y4,lineId2,type] of rightcluster.lines) {if(x1<=x3 && x2>=x4 && y1<=y3 && y2>=y4 )
{rightpointlist.push([x3-clusterMinx, y3, x4-clusterMinx, y4,lineId2,type]);rightpointmap .set(`${x3-clusterMinx },${y3 }`, true);rightpointmap .set(   `${x4-clusterMinx },${y4}`, true);}}
}


看看别人怎么写的

 

for (const [fx1, fy1, fx2, fy2, lineId, type] of frontpointlist) {for (const [tx1, ty1, tx2, ty2, lineId2, type2] of toppointlist) {if (fx1 === tx1 && fx2 === tx2) {const A=[fx1, fy1, ty1];const Ahat=[fx1, fy1, ty2];const B=[fx2, fy2, ty1];const Bhat=[fx2, fy2, ty2];}}
}

好短

const seenLinePairs = new Set<string>(); // 用于记录已经添加过的 [lineId, lineId2] 对
function drawlines(x1:number, y1:number, z1:number , x2:number, y2:number, z2:number , lineId:number, type:number){if([x1, y1, z1].join(',') === [x2, y2, z2].join(','))return;const drawline2=[x1, y1, z1 , x2, y2,z2]const key2 = drawline2.map(v => v.toFixed(2)).join(',');if (!seenLinePairs.has(key2)) {seenLinePairs.add(key2);lines3d.push([x1, y1, z1, x2, y2, z2 , lineId, type]);}}
for (const [fx1, fy1, fx2, fy2, lineId, type] of frontpointlist) {for (const [tx1, ty1, tx2, ty2, lineId2, type2] of toppointlist) {if (fx1 === tx1 && fx2 === tx2) {const A=[fx1, fy1, ty1];const Ahat=[fx1, fy1, ty2];const B=[fx2, fy2, ty1];const Bhat=[fx2, fy2, ty2];drawlines(A[0], A[1], A[2], Ahat[0], Ahat[1], Ahat[2], lineId, type);drawlines(B[0], B[1], B[2], Bhat[0], Bhat[1], Bhat[2], lineId, type);drawlines(A[0], A[1], A[2], B[0], B[1], B[2], lineId, type);drawlines(Ahat[0], Ahat[1], Ahat[2], Bhat[0], Bhat[1], Bhat[2], lineId, type);}}
}

又缺线 

for (const [fx1, fy1, fx2, fy2, lineId, type] of frontpointlist) {for (const [tx1, ty1, tx2, ty2, lineId2, type2] of toppointlist) {if (isLineInSet([fx1,ty1,fx2,ty1] ,toplineSet)&& isLineInSet([fx1,ty2,fx2,ty2] ,toplineSet)) {const A=[fx1, fy1, ty1];const Ahat=[fx1, fy1, ty2];const B=[fx2, fy2, ty1];const Bhat=[fx2, fy2, ty2];drawlines(A[0], A[1], A[2], Ahat[0], Ahat[1], Ahat[2], lineId, type);drawlines(B[0], B[1], B[2], Bhat[0], Bhat[1], Bhat[2], lineId, type);drawlines(A[0], A[1], A[2], B[0], B[1], B[2], lineId, type);drawlines(Ahat[0], Ahat[1], Ahat[2], Bhat[0], Bhat[1], Bhat[2], lineId, type);}}
}

 

明天用rbush解决兀的情况,然后前视图俯视图调换一下看看效果

http://www.dtcms.com/wzjs/171608.html

相关文章:

  • 好的活动策划网站网站运营师
  • 江门学做网站课程网页制作费用大概多少
  • 那样的网站佛山疫情最新消息
  • 做电影收费网站大数据平台
  • 设计好的免费网站建设网络广告投放渠道有哪些
  • 男孩子和男孩子在一起怎么做网站百度竞价推广常用到的工具
  • 单页网站与传统网站的区别竞价推广托管
  • 有哪些营销型网站推荐如何查询关键词的搜索量
  • 制作钓鱼网站的费用seo优化官网
  • 济南营销型网站制作公众号排名优化软件
  • 怎么看一个网站是由哪个公司做的营口seo
  • 网站开发公司找哪家交换友链
  • 镇江市质监站网址泉州百度网络推广
  • 网站难做吗志鸿优化网
  • 网站建设计入什么费用seo是干啥的
  • 做网站需要编程基础长沙百度快照优化排名
  • 做网站怎么添加图片郴州seo
  • 怎么在360做网站百度竞价推广课程
  • 我想网上开店怎么开seo网络搜索引擎优化
  • 网站建设的营业执照百度站长工具app
  • 上饶网站建设公司公司网站制作费用
  • 山西响应式网页建设哪家有整站优化服务
  • 大网站的二级域名南宁网络推广品牌
  • 镇江市丹徒区疫情seo公司seo教程
  • 网站开发背景怎么写广州seo公司哪个比较好
  • 市场来说网站建设销售发展怎么样seo网站快速排名软件
  • 网站运营论文竞价推广的基本流程
  • 网站建设采用的技术一键注册所有网站
  • 怎么做资源网站站外seo是什么
  • 在墙外的优质网站网络营销计划包括哪七个步骤