Questions tagged [projection]

A projection is the transformation of a set of data from one form into another.

Mathematically speaking a projection is a function that yields the same result if applied multiple times.

The term is used with this meaning in graphics when 'projecting' a 3D scene on a 2D canvas.

The same is often happening when analyzing data with many dimensions (age, gender, number of transactions, ...) and projecting it on fewer dimensions, in the simple case by just dropping dimensions or by creating new dimensions like (might commit fraud).

When dealing with typed languages the dimensions might be attributes of a class. So if I have one or multiple types with attributes (A, B, C, ...) and create from instances of those types instances of a type which has only the attributes (A, B) this is a projection too.

Another example are databases. A projection is an operation which discards some attributes of a tuple, in other words, which omits some columns of a relational database query result. For an object or document database a projection filters out some fields.

After all a database projection yields the same result if applied multiple times, too.

2017 questions
9
votes
3 answers

image coordinate to world coordinate opencv

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…
mefmef
  • 665
  • 2
  • 11
  • 23
9
votes
1 answer

Exact definition of the matrices in OpenCv StereoRectify

Normally the definition of a projection matrix P is the 3x4 matrix which projects point from world coordinates to image/pixel coordinates. The projection matrix can be split up into: K: a 3x4 camera matrix K with the intrinsic parameters T: a 4x4…
Thorbjorn
  • 317
  • 2
  • 8
9
votes
1 answer

How do I apply a projection to a Spring Data REST query method resource?

I'm using Spring Data REST 2.1.4.RELEASE. I created an entity Booking, its REST repository (extending CrudRepository) named BookingRepository and a projection BookingDetails (annotated with @Projection(name="details", types = Booking.class)) for…
bluish
  • 26,356
  • 27
  • 122
  • 180
9
votes
1 answer

QueryDSL projections with @ManyToOne relation

I'm using OpenJPA with QueryDSL, I try to avoid manipulating Tuple objects by using the bean projections features of QueryDSL. I have for example these two Entity, with a @ManyToOne relation. @Entity public class Folder { private Long id; …
tomahim
  • 1,298
  • 2
  • 11
  • 29
9
votes
2 answers

Is there a variant of min_element which takes a projection function?

std::min_element will return the smallest element as defined either by operator<(T,T) or by a custom predicate bool Pred(T,T). Is there a similar function which returns the element for which the projection function f(T)->R takes on the minimal…
MSalters
  • 173,980
  • 10
  • 155
  • 350
8
votes
3 answers

C# Linq Projecting Anonymous type onto an interface

Is it possible to project using a Select onto a anonymous type? Here is some example code public interface ITest { string A{get;} int B{get;} } string[] names = { "Tom", "Dick", "Harry", "Mary", "Jay" }; IQueryable query = from …
Raj Rao
  • 8,872
  • 12
  • 69
  • 83
8
votes
2 answers

Formula for a orthogonal projection matrix?

I've been looking around a bit and can't seem to find just what I"m looking for. I've found "canonical formulas," but what's the best way to use these? Do I have to scale every single vertex down? Or is there a better way? A formula would really…
Chad
  • 2,335
  • 8
  • 29
  • 45
8
votes
3 answers

Grails: Projection on many tables?

I have some problems with projection in Grails. Could you please help me review them and suggest solutions for me? I want to query data on many tables which has many-to-one relationship and projection on some properties on both of them. For…
Đinh Hồng Châu
  • 5,300
  • 15
  • 53
  • 90
8
votes
3 answers

2D X-ray reconstruction from 3D DICOM images

I need to write a python function or class with the following Input/Output Input : The position of the X-rays source (still not sure why it's needed) The position of the board (still not sure why it's needed) A three dimensional CT-Scan Output :…
AnaRhisT
  • 103
  • 8
8
votes
1 answer

How to add an encircling axes around a polar plot?

I'm trying to figure out how to append an axes to my polar projection. The newly added axes is supposed to wrap around the original polar axes like a ring. For that purpose I tried to use append_axes from a divider created via make_axes_locatable on…
O.rka
  • 29,847
  • 68
  • 194
  • 309
8
votes
1 answer

How to filter fields from a mongo document with the official mongo-go-driver

How can I filter fields with the mongo-go-driver. Tried it with findopt.Projection but no success. type fields struct { _id int16 } s := bson.NewDocument() filter := bson.NewDocument(bson.EC.ObjectID("_id", starterId)) var opts…
Karl Wolffgang
  • 83
  • 1
  • 1
  • 4
8
votes
2 answers

Load child collection DTOs in JPA DTO projection query

I'm using Java EE 7 with Java 8 and Hibernate (5.0.X) on Wildfly 10.1.0-Final, and I need to load a a JPQL query result into DTOs using projections, but I can't find any documentation on how to load the child collection DTOs as well. For instance,…
MorganP
  • 183
  • 3
  • 11
8
votes
1 answer

Converting 360 degree view to equirectangular in node js?

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…
PvDev
  • 791
  • 21
  • 67
8
votes
0 answers

Spring Interface Projection with UUID

I'm trying to use a JPA Projection (Spring v1.5.9.RELEASE) to return a custom type from a JpaRepository as follows (MCVE): @Repository public interface TestRepository extends JpaRepository { public interface TestValue { UUID…
trylimits
  • 2,575
  • 1
  • 22
  • 32
8
votes
1 answer

Screen Coordinates to World Coordinates

I want to convert from Screen coordinates to world coordinates in OpenGL. I am using glm for that purpose (also I am using glfw) This is my code: static void mouse_callback(GLFWwindow* window, int button, int action, int mods) { if (button ==…
RdlP
  • 1,366
  • 5
  • 25
  • 45