Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged


I've done some small changes to how I usually construct my view matrix, here is what I've modified: // put it after N = ... U = cross(N, Vspec); U = U / sqrt(dot(U,U)); % normalize V = cross(U, N); Then I also set N vector as -N to R matrix, like this: R= [U(1),U(2),U(3),0; % U is direction of camera space X axis V(1),V(2),V(3),0; % V is direction of ...


Just realized that this is an equation involving homogeneous vectors; thus the 3-vectors should not equal, they have the same direction but may differ in magnitude by a nonzero scale factor.


The values will only form a cube after performing the perspective divide, which I don't see happening in your code. That is, you take a vector $[x, y, z, 1]$ and transform it by the projection matrix, resulting in a new vector $[x', y', z', w']$. Then divide out the fourth component to get a 3D vector, $[x'/w', y'/w', z'/w']$. This last is the one that ...


Your transform looks correct. To transform from world to eye coordinates, I I always use a "lookat" transform, defined by 3 vectors: $\bf{e}$, $\bf{a}$ and $\bf{u}$; in english, the eye position, the point it's looking at, and an up vector, which must not be in the same direction as $\bf{a} - \bf{e}$ (more specifically, not a multiple of it). The space is ...


A function $f$ on your triangulated surface is an assignment of real numbers on the vertices of the triangulation and therefore $f \in \mathbb{R}^{|\mathcal{V}|}$. According to the continuous theory, the gradient should be a linear (differential) operator that takes a function and spits out a vector field. Hence, in the discrete theory, the gradient should ...


First simple thresholding is usually not a good idea. However, if you want to do that, I suggest to also consider other color spaces. In your case, HSV might be a better choice; You can convert your image into HSV-image then you can define a range on Hue channel to select yellow. Also, take a look at this article; it is about implementing Adaptive ...

Only top voted, non community-wiki answers of a minimum length are eligible