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
13
votes
3 answers

Radius of projected sphere in screen space

I'm trying to find the visible size of a sphere in pixels, after projection to screen space. The sphere is centered at the origin with the camera looking right at it. Thus the projected sphere should be a perfect circle in two dimensions. I am aware…
BuschnicK
  • 5,304
  • 8
  • 37
  • 49
13
votes
2 answers

Kinect intrinsic parameters from field of view

Microsoft state that the field of view angles for the Kinect are 43 degrees vertical and 57 horizontal (stated here) . Given these, can we calculate the intrinsic parameters i.e. focal point and centre of projection? I assume centre of projection…
Aly
  • 15,865
  • 47
  • 119
  • 191
13
votes
1 answer

How efficient are MongoDB projections?

Is there a lot of overhead in excluding nearly all of the data in a document when querying a mongo database? For example, in the case where I only want field1 and field2, for a collection with a document structure of: { "field1" : 1 "field2"…
Ash
  • 3,279
  • 4
  • 28
  • 26
13
votes
1 answer

Orchard Query List Rendering - Remove ul li

I am using the latest version of Orchard and have created a projection widget of three articles. I would like to display them in source terms directly after eachother:
content
content
AndyD
  • 297
  • 1
  • 10
12
votes
2 answers

How can some LatLng be used to place markers on a Google map, but not to draw a Polygon?

Roughly a week ago, I ran into a problem: on a custom google-powered map, my Polygons would not show up, while Markers for the same coordinates are totally ok. Despite my efforts with the Google Maps API, it seems I cannot find why. Here is a link…
12
votes
3 answers

square to trapezoid

I know that transforming a square into a trapezoid is a linear transformation, and can be done using the projective matrix, but I'm having a little trouble figuring out how to construct the matrix. Using the projective matrix to translate, scale,…
Andrew Prock
  • 6,900
  • 6
  • 40
  • 60
12
votes
1 answer

OpenCV unproject 2D points to 3D with known depth `Z`

Problem statement I am trying to reproject 2D points to their original 3D coordinates, assuming I know the distance at which each point is. Following the OpenCV documentation, I managed to get it to work with zero-distortions. However, when there…
RafazZ
  • 4,049
  • 2
  • 20
  • 39
12
votes
2 answers

How do I correctly use EF Core with AutoMapper ProjectTo and Unions?

My Setup ASP.NET Core 2.0 EntityFrameworkCore 2.0.1 AutoMapper 6.2.2 Problem I have a project with a DTO called PersonDetail and an Entity called Person. When I call db.People.Where(p => p.FirstName == "Joe").Union(db.People.Where(p => Age >…
Phobis
  • 7,524
  • 10
  • 47
  • 76
12
votes
1 answer

Can Spring JPA projections have Collections?

I have a Customer entity from which I only want to select a few fields and their associated CustomerAddresses. I've defined a Spring Data JPA projection interface as follows: public interface CustomerWithAddresses { Integer getId(); String…
Jason
  • 151
  • 1
  • 4
12
votes
2 answers

Inverse Homography

I get an H matrix using findHomography function. H = findHomography(points_src, points_dst); Then, I use H with warpPerspective to get a perspective projection of the image warpPerspective(im_src, im_dst, H, Size(100, 100)); and from here I get…
12
votes
2 answers

Why Projection Operator in relational algebra eliminates duplicates?

What are the consequences of eliminating duplicates in Projection Operator?And yes, why there is no duplicate elimination in real systems, unless specified?
Ashish
  • 358
  • 2
  • 4
  • 15
12
votes
1 answer

Why the values of my raster map change when I project it to a new CRS (projectRaster function in R)?

I need to project a map in latlong to an azimuthal equidistant projection. map_proj<-projectRaster(map, crs="+proj=aeqd +lon_0=48+lat_0=18") In my original map I have these values class : RasterLayer dimensions : 1713, 2185, 3742905 …
Oritteropus
  • 531
  • 2
  • 6
  • 18
11
votes
2 answers

Spring Jpa Projection interface occur error with Boolean type

Q. Why JPA Projection can't convert Mysql bit(1) to Java Boolean? Spring Jpa Projection occur error Projection type must be an interface! when the Mysql bit(1) type maps to the Java Boolean type. Jpa converts a Boolean column in Entity class to…
hynuah_iia
  • 429
  • 7
  • 14
11
votes
2 answers

spring data jpa - Custom type conversion in interface-based projection

I'm trying to implement Interface-based Projection but I cannot make it work with my custom type column. Below example of what I'm trying to do: Repository: @Query(value = "SELECT customType from TABLE", nativeQuery = true) List
11
votes
0 answers

OpenGL matrices - cannot figure correct ones

Edit: Summarizing what I want to do, more concise: Render a texture of size wi,hi to an output texture wo,ho, so that the aspect ratio of input texture is maintained, and it fits inside the output texture, eventually with black borders if aspect…
user1592546
  • 1,480
  • 1
  • 14
  • 30