projection

How to avoid Z-fighting in distance?

点点圈 提交于 2019-12-06 06:48:39
问题 So I recently watched a video on Z-fighting, and learned of a simple way to take care of it--mostly. The solution given was to actually skew the projection so that closer objects were given more space for more accurate depth testing (since floats can only be so precise), and further away objects were crammed into a small area of the projection. Now I'm quite new to OpenGL and graphics programming (just working through slowly), and I haven't actually made anything complex enough where this is

Converting 360 degree view to equirectangular in node js?

ぐ巨炮叔叔 提交于 2019-12-05 23:25:15
问题 I have been trying to convert the 360 degree camera, single fish eye image, to equirectangular viewer in node js for the past two days. In stackoverflow, the same question is asked and answered in pseudo code. I have been trying to convert pseudo code to node js and cleared some errors. Now the project runs without error but the output image is blank. From that pseudo, I dont know the polar_w, polar_h and geo_w, geo_h, geo and polar value, so, it gave static value to show the output. Here is

R mapproj lambert-azimuthal equal area projection

徘徊边缘 提交于 2019-12-05 20:22:36
How can I do a lambert-azimuthal equal area projection with the mapproj package? http://cran.r-project.org/web/packages/mapproj/mapproj.pdf There is azequalarea() equal-area and lambert(lat0,lat1) conformal, true scale on lat0 and lat1 What one is closests to lambert-azimuthal equal area projection? In package mapproj , and the function mapproject() , it seems that the Lambert-azimuthal equal area projection would be azequalarea() since lambert(lat0,lat1) is the Lambert Conformal Conic projection (since it is listed in the manual in the Polar conic projections symmetric about the Prime

Angular2: ng-content attributes passing to child component

我们两清 提交于 2019-12-05 20:03:01
问题 Is something like this possible? I want to pass an "hasfocus" variable from cjc-box through ng-content attributes to the cjc-input component. app.component.html <div cjc-box><div cjc-input></div></div> cic-box.component.html <div class="cjc-box"> <div><ng-content hasfocus="focus"></ng-content></div> </div> cic-input.component.html <input class="cjc-input" type="text" focus="{{hasfocus}}" /> Is this even possible with projections in ng2? 回答1: It is possible to pass variable to projected

Hibernate criteria with projection not performing query for @OneToMany mapping

好久不见. 提交于 2019-12-05 14:45:24
I have a domain object, Expense, that has a field called initialFields . It's annotated as so: @OneToMany(fetch = FetchType.EAGER, cascade = { CascadeType.ALL }, orphanRemoval = true) @JoinTable(blah blah) private final List<Field> initialFields; Now I'm trying to use Projections in order to only pull certain fields for performance reasons, but when doing so the initialFields field is always null. It's the only OneToMany field and the only field I am trying to retrieve with the projection that is behaving this way. If I use a regular HQL query initialFields is populated appropriately, but of

image coordinate to world coordinate opencv

狂风中的少年 提交于 2019-12-05 05:38:22
I calibrated my mono camera using opencv. Now I know the camera intrinsic matrix and distortion coefs [K1, K2, P1 ,P2,K3 ,K4, K5, K6] of my camera. Assuming that camera is place in [x, y, z] with [Roll, Pitch, Yaw] rotations. how can I get each pixel in world coordinate when the camera is looking on the floor [z=0]. You say that you calibrated your camera which gives you: Intrinsic parameters Extrinsic parameters (rotation, translation) Distortion coefficients First, to compensate for the distortion, you can use the undistort function and get an undistorted image. Now, what you are left with

How to project a spherical map onto a sphere / cube: “Equirectangular to cubic”

主宰稳场 提交于 2019-12-04 22:33:41
问题 UPDATE: I found that, http://os.ivrpa.org/panosalado/wiki , has an implementation in java. Anyone who has something similar in c or c++? I have this panorama, an spherical map from google streetview, and want to map this on a sphere/cube. Below are some examples and illustrations, what i seek is a library that can do it, or some implementation guides. I tried http://krpano.com/docu/tutorials/quickstart/#top that gives the results listed at the bottom. It illustrates what i want, but the

nhibernate queryOver projection syntax

假装没事ソ 提交于 2019-12-04 21:21:48
问题 I am trying some code out from a NH 3.0 Cookbook, and wondering why I can't get the code below to compile. I think the QueryProjectionBuilder that should make this work is in "NHibernate.Criterion.Lambda" but the using directive for it doesn't help. The problems are the SelectGroup and SelectAvg parts. Assuming the syntax from the book is correct, can anyone see a missing reference here? namespace Queries.Implementations { using System; using System.Collections.Generic; using System.Linq;

Projection matrix implementation

巧了我就是萌 提交于 2019-12-04 17:20:14
I'm trying to build my own Rasteriser/Graphics pipeline (mimicking OpenGL) from scratch and I'm having problems with implementing a working perspective projection matrix. This is my current attempt: template<typename T> Matrix<T,4,4> Perspective(T fov,T aspect, T near, T far) { T mat00 = 1 / (aspect*tan(0.5f*fov)); T mat11 = 1 / tan(0.5f*fov); T mat22 = (-near-far)/(near-far); T mat32 = (2*near*far)/(near-far); T data[] = { mat00, 0, 0, 0, 0 , mat11, 0, 0, 0 , 0, mat22,mat32, 0 , 0, 1, 0 }; return Matrix<T,4,4>(data); } This is then passed to the vertex processing which performs the following:

How can I find the 3D coordinates of a projected rectangle?

回眸只為那壹抹淺笑 提交于 2019-12-04 15:56:40
I have the following problem which is mainly algorithmic. Let ABCD be a rectangle with known dimensions d1, d2 lying somewhere in space. The rectangle ABCD is projected on a plane P (forming in the general case a trapezium KLMN). I know the projection matrix H. I can also find the 2D coordinates of the trapezium edge points K,L,M,N. The Question is the following : Given the Projection Matrix H, The coordinates of the edges on the trapezium and the knowledge that our object is a rectangle with specified geometry (dimensions d1, d2), could we calculate the 3D coordinates of the points A, B, C, D