抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

Hello World

人よ、幸福に生きろ!

相机校正 Camera Calibration 前言 从这里开始是研究现实世界转化到屏幕空间的关系,注意和图形学分别开 在图像测量过程以及机器视觉应用中,为确定空间物体表面某点的三维几何位置与其在图像中对应点之间的相互关系,必须建立相机成像的几何模型,这些几何模型参数就是相机参数 Camera Calibration简单来说就是求解世界空间到像素空间的过程,也就是求解最终的投影矩阵的过程 坐...
element.classList.remove("active", "active-current"); }); target.classList.add("active", "active-current"); let parent = target.parentNode; while (!parent.matches(".toc")) { if (parent.matches("li")) parent.classList.add("active"); parent = parent.parentNode; } } // 方案一: volantis.activateNavIndex = 0 activateNavByIndex(navItems[volantis.activateNavIndex]) if (targets[0]) { volantis.scroll.push(() => { if (targets[0].getBoundingClientRect().top >= 0) { volantis.activateNavIndex = 0 } else if (targets[targets.length - 1].getBoundingClientRect().top < 0) { volantis.activateNavIndex = targets.length - 1 } else { for (let index = 0; index < targets.length; index++) { const target0 = targets[index]; const target1 = targets[(index + 1) % targets.length]; if (target0.getBoundingClientRect().top < 0 && target1.getBoundingClientRect().top >= 0) { volantis.activateNavIndex = index break; } } } activateNavByIndex(navItems[volantis.activateNavIndex]) }) } // 方案二: // IntersectionObserver 不是完美精确到像素级别 也不是低延时性的 // function findIndex(entries) { // let index = 0; // let entry = entries[index]; // if (entry.boundingClientRect.top > 0) { // index = sections.indexOf(entry.target); // return index === 0 ? 0 : index - 1; // } // for (; index < entries.length; index++) { // if (entries[index].boundingClientRect.top <= 0) { // entry = entries[index]; // } else { // return sections.indexOf(entry.target); // } // } // return sections.indexOf(entry.target); // } // function createIntersectionObserver(marginTop) { // marginTop = Math.floor(marginTop + 10000); // let intersectionObserver = new IntersectionObserver( // (entries, observe) => { // let scrollHeight = document.documentElement.scrollHeight; // if (scrollHeight > marginTop) { // observe.disconnect(); // createIntersectionObserver(scrollHeight); // return; // } // let index = findIndex(entries); // activateNavByIndex(navItems[index]); // }, { // rootMargin: marginTop + "px 0px -100% 0px", // threshold: 0, // } // ); // sections.forEach((element) => { // element && intersectionObserver.observe(element); // }); // } // createIntersectionObserver(document.documentElement.scrollHeight); } document.addEventListener("DOMContentLoaded", () => { volantis.requestAnimationFrame(listenSidebarTOC) });