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
5
votes
1 answer

finding the mapping between video point and real world point

I am doing car tracking on a video. I am trying to determine how many meters it traveled. I randomly pulled 7 points from a video frame. I made point1 as my origin Then on the corresponding Google Maps perspective, I calcculated the distances of the…
Snake
  • 14,228
  • 27
  • 117
  • 250
5
votes
3 answers

Mapping from 2D projection back to 3D point cloud

I have a 3D model consisting of point vertices (XYZ) and eventually triangular faces. Using OpenGL or camera-view-matrix-projection I can project the 3D model to a 2D plane, i.e. a view window or an image with m*n resolution. The question is how…
rnd_nr_gen
  • 2,203
  • 3
  • 36
  • 55
5
votes
2 answers

how to change matplotlib 3d plot to side-view?

If there is arrays of x, y, and z coordinates. I don't mean to show a static 2d plot, which can be drawn by plot(x, y) I mean import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax =…
oyster
  • 537
  • 3
  • 15
5
votes
1 answer

How does cv2.projectPoints actually work?

I'm trying to write my own implementation of cv2.projectPoints just for practice, and my implementation is not behaving as expected. I'm assuming a pinhole camera with no distortion, so all I'm doing is applying the following equation to all of my…
5
votes
1 answer

AutoMapper ProjectTo fails with FirstOrDefault

I am using AutoMapper ProjectTo to map Person entities to EmployeeDto. In my EmployeeDto i have a single AddressDto property which i want to capture. Becuase the Person has a collection of Address i defined my mapping to capture the first…
chadb
  • 199
  • 3
  • 12
5
votes
1 answer

LINQ to SQL Projection: Func vs Inline

I am finding some unexpected behavior when using a projection in a LINQ to SQL query using a Func. Example code will explain better than words. A basic L2S lambda query using projection: db.Entities.Select(e => new DTO(e.Value)); It translates to…
mikesigs
  • 10,491
  • 3
  • 33
  • 40
5
votes
1 answer

Hibernate criteria with projection not performing query for @OneToMany mapping

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
Josh
  • 2,842
  • 8
  • 45
  • 51
5
votes
0 answers

Keras implementation of LSTMCell (The class uses optional peep-hole connections, optional cell clipping, and an optional projection layer).

According to my understanding, Keras LSTM cell is similar to Tensorflow BasicLSTMCell(RNNCell). However, I am looking for the implementation of Tensorflow LSTMCell(RNNCell) in Keras (LSTMCell : The class uses optional peep-hole connections, optional…
Rithmax
  • 163
  • 1
  • 5
5
votes
1 answer

Error when running solvePnP in OpenCV Python

I am trying to make an augmented reality program in OpenCV. But I seem to always get an error when I call solvePnP. What I am trying to do is make an augmented reality program in OpenCV by taking homography points of a selected cropped image to the…
user3377126
  • 2,091
  • 4
  • 32
  • 39
5
votes
1 answer

How to get multiselect results containing both properties and lists via JPA 2.1 in Java?

The goal is to get the firstName, lastName, and the list of todos for an employee by using multiselect: CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery q = cb.createTupleQuery(); Root emp = q.from(Employee.class); q.multiselect( …
Nabi
  • 2,536
  • 1
  • 16
  • 18
5
votes
2 answers

Hibernate Criteria Query to get only specific columns

I have two tables: ReportRows and DataRows Table ReportRows: @Id @Column(name = "ID") private Long id; @ManyToOne @JoinColumn(name = "T_REPORT_CODE") private Report report; @OneToOne(fetch = FetchType.EAGER, cascade =…
Caroline
  • 232
  • 1
  • 2
  • 11
5
votes
5 answers

"sphere in a bag" plane to sphere projection

I'm looking for the mathematical transformation to transform points on a 2D plane [0,1]x[0,1] onto the unitsphere. The most common projection would latitude-longitude mapping by interpreting u and v as the angles for the spherical coordinates (map u…
Mat
  • 51
  • 1
  • 3
5
votes
3 answers

How to expose a complete tree structure with Spring Data REST and HATEOAS?

I have a JPA tree structure @Entity public class Document { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; private String text; @ManyToOne @JoinColumn(name = "parent") Document parent; …
Nordkraft
  • 125
  • 2
  • 9
5
votes
0 answers

How do I plot a rectangular image of a rotated map in ggplot2?

I'll preface this by admitting that this is my first post to Stack Overflow, so apologies if I miss some of the finer points. I am creating a series of maps of the Antarctic Peninsula in ggplot2 using a vector shapefile of the coastline. Creating…
5
votes
4 answers

How to avoid Z-fighting in distance?

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…
Sam Claus
  • 1,807
  • 23
  • 39