VTK/Geovis vision toolkit: Difference between revisions
No edit summary |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 33: | Line 33: | ||
vtkTrackRepresentation -> vtkRenderedRepresentation | vtkTrackRepresentation -> vtkRenderedRepresentation | ||
vtkVideoReprensentation -> vtkRenderedRepresentation | vtkVideoReprensentation -> vtkRenderedRepresentation | ||
vtkVisStrategyRepresentation -> vtkRenderedRepresentation | |||
} | } | ||
</graphviz> | </graphviz> | ||
vtkVideoElementRepresentation would contain all the information layers and make sure that they are in sink. | * vtkVideoElementRepresentation would contain all the information layers and make sure that they are in sink. | ||
Also this is the representation thats responsible for consuming the data for | Also this is the representation thats responsible for consuming the data for | ||
each video. | each video. | ||
* vtkVisStrategyRepresentation | |||
<source lang="cpp"> | <source lang="cpp"> | ||
// Interface for this class is not as clear as it should be. Basically it transforms all layers | |||
// associated with any given vtkVideoElementRepresentation and represents this transformation via | |||
// some geometry. | |||
class vtkVisStrategyRepresentation : public vtkRenderedRepresentation | class vtkVisStrategyRepresentation : public vtkRenderedRepresentation | ||
{ | { | ||
public: | public: | ||
void | |||
// Return transformation matrix that can be used to offset any other representation. | |||
vtkMatrix4x4 GetMatrix(); | |||
virtual void PrepareForRendering(vtkRenderView* view); | |||
}; | }; | ||
Line 54: | Line 65: | ||
void AddTrackRepresentation(vtkTrackRepresentation* tr); | void AddTrackRepresentation(vtkTrackRepresentation* tr); | ||
void AddVideoRepresentation(vtkVideoRepresentation* vr); | void AddVideoRepresentation(vtkVideoRepresentation* vr); | ||
void | void SetVisStrategyRepresentation(vtkVisStrategyRepresentation* vsr); | ||
// Update all the layers and call \c PrepareForRendering(....) on each. | // Update all the layers and call \c PrepareForRendering(....) on each. | ||
virtual void PrepareForRendering(vtkRenderView* view); | virtual void PrepareForRendering(vtkRenderView* view); | ||
private: | private: | ||
Line 70: | Line 79: | ||
{ | { | ||
public: | public: | ||
virtual void PrepareForRendering(vtkRenderView* view); | virtual void PrepareForRendering(vtkRenderView* view); | ||
} | } | ||
Line 81: | Line 87: | ||
{ | { | ||
public: | public: | ||
void SetScalarProperty(double value, double range[2]); | |||
// Can have 0 or many scalar representations. | |||
void AddScalarRepresentation(ScalarRepMode); | |||
virtual void PrepareForRendering(vtkRenderView* view); | virtual void PrepareForRendering(vtkRenderView* view); | ||
} | } | ||
</source> | </source> | ||
== Geovis == | |||
* Dealing with precision issues | |||
When dealing with large numbers (earth radius is 6357000) in rendering causes issues of Jitter. This is a known problem as the GPU uses single precision floats as the data type. | |||
There could be couple of ways this issue can be dealt with. | |||
** On the fly change of origin | |||
** Piecewise change of origin | |||
** Using FO (floating approach as described in this paper link??. http://www.floatingorigin.com/pubs/thorneC-FloatingOrigin.pdf | |||
** Use lat / lon in radians and height in Km instead of meter. | |||
** RTC / RTE approaches as suggested here: http://blogs.agi.com/insight3d/index.php/2008/09/03/precisions-precisions/#more-80 | |||
** Use double precision all and cast it to float. (It does help a bit but the problem exists). |
Latest revision as of 23:39, 5 February 2010
Requirements
There are two parts to the project:
- Video / related meta data rendering and interactions.
- Displaying video / meta data in geospatial context.
As per our discussion we have gathered following requirements for the project.
- Easy to put together.
- Provides 2D and 3D mode where in 2D it will allow quick validation, manipulation abilities.
- Provides the ability to visualize, video, track, and associated ranking.
- Ability to provide input as sequence of images or a video file.
- Provides the ability to manipulate track data. User should be able to insert a new one, modify the existing one.
- Provides the ability to select a region with pixel level accuracy and draw a track on top of it.
- Provides the ability to play many video files (small or large video) files.
- Provides a layout for the videos in space so that each can be seen clearly for a view point.
- Allows the videos to play individually or globally.1
- Provides the ability to toggle different layers of information.
- Provides geo spatial context.
Design
- vtkVideoElementRepresentation would contain all the information layers and make sure that they are in sink.
Also this is the representation thats responsible for consuming the data for each video.
- vtkVisStrategyRepresentation
<source lang="cpp">
// Interface for this class is not as clear as it should be. Basically it transforms all layers // associated with any given vtkVideoElementRepresentation and represents this transformation via // some geometry. class vtkVisStrategyRepresentation : public vtkRenderedRepresentation { public:
// Return transformation matrix that can be used to offset any other representation. vtkMatrix4x4 GetMatrix();
virtual void PrepareForRendering(vtkRenderView* view);
};
class vtkVideoElementRepresentation : public vtkRenderedRepresentation
{
public:
void AddTrackRepresentation(vtkTrackRepresentation* tr); void AddVideoRepresentation(vtkVideoRepresentation* vr); void SetVisStrategyRepresentation(vtkVisStrategyRepresentation* vsr);
// Update all the layers and call \c PrepareForRendering(....) on each. virtual void PrepareForRendering(vtkRenderView* view);
private:
Internal* Implementation; };
class vtkTrackRepresentation : public vtkRenderedRepresentation
{
public:
virtual void PrepareForRendering(vtkRenderView* view);
}
class vtkVideoRepresentation : public vtkRenderedRepresentation
{
public:
void SetScalarProperty(double value, double range[2]);
// Can have 0 or many scalar representations. void AddScalarRepresentation(ScalarRepMode);
virtual void PrepareForRendering(vtkRenderView* view);
}
</source>
Geovis
- Dealing with precision issues
When dealing with large numbers (earth radius is 6357000) in rendering causes issues of Jitter. This is a known problem as the GPU uses single precision floats as the data type. There could be couple of ways this issue can be dealt with.
- On the fly change of origin
- Piecewise change of origin
- Using FO (floating approach as described in this paper link??. http://www.floatingorigin.com/pubs/thorneC-FloatingOrigin.pdf
- Use lat / lon in radians and height in Km instead of meter.
- RTC / RTE approaches as suggested here: http://blogs.agi.com/insight3d/index.php/2008/09/03/precisions-precisions/#more-80
- Use double precision all and cast it to float. (It does help a bit but the problem exists).