Class VRControl
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
However, not all these parameters are necessarily needed to gain some sort of location information. For example, tilt and pitch, focal length and height can determine the distance to animal without the need for heading information or a GPS location.
There are various ways a user can determine required parameters, either directly from a photograph or external data. The simplest example is using the horizon to determine the pitch and tilt of the camera and manually inputting height data along with a calibration (pixels per degree/rad) value. Users may want to use external IMU data, either in real time or for post processing. Geo-tagged photos are another option.
This module is designed to provide a framework for photogrammetry. The core functionality allows users to open and view photographs/images along with any meta data. VRMethod classes are then used to provide the user interface for determining the l.ocation of an object
VRmethods use a JLayer over the photograph to allow users to select locations, draw lines etc. Each VRMethod has it's own side panel and ribbon panel to allow users to input information and select relevant. The VRMethod is responsible for calculating location information which is passed back to VRControl to be saved as a generic video range data unit.
Generic Information Handled outside VRMethods (these are used by one or more VRMethods but handled solely within a VRMethod class)
GPS location of camera
Calibration Values
Landmark Locations
Tide Information
Imported Maps
External Sensor data
Photo meta data
- Author:
- Doug Gillespie and Jamie Macaulay
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
The heading of the image has been changed (usually manually).static final int
The height has been changedstatic final int
The image has changedstatic final int
The scale of the image has been changed.static final int
The time of the image has been changed.static final int
The landmark group selection has been changedstatic final int
The vrMethod has changedstatic final int
The mouse has moved on the display.static final int
static final int
The pitch of the image has been changed (usually manually)static final int
A repaint has been called.static final int
Some settings in the vrparams may have changedstatic final int
The roll of the image has been changed (usually manually), note: roll is often referred to as tilt.Panel containing all gui components -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindNextFile
(File file, ImageFileFilter filefilter, boolean forward) Find the next file which is approved by the Image file filter in the folder.Get the calibration method.double
Get the current height of the camera from sea level.Get the current pam image.Get the current vr Method.Get the date of the image.long
Get the current image time in millis.Get the current image time aprserGet the time of the current image.Get the location manager.Get the file manager for shore based method maps.Get a list of the current measurements on the imageGet an arraylist of all the vr methods currently available.long
Get the import system for tide data.Get the tide manager.Get the vr panel.Get the VR paramters class.Get the VRProcess.int
boolean
isFX()
Check whether the GUI is FX or not.void
Load an image filevoid
newMousePoint
(Point mousePoint) void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.void
Pastes an image from the computers clipboard.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
selectHeight
(int heightIndex) Set the current selected heightvoid
setCurrentImage
(PamImage image) Set the current image.void
setMeasuredAnimals
(ArrayList<VRMeasurement> measuredAnimals) void
setRangeMethods
(VRHorzMethods rangeMethods) void
settingsButtonAWT
(Frame frame, int tab) Opens the settings dialog and updates the module if new settings are saved.void
settingsButtonFX
(int tab) Opens settings pane which updates module settingsvoid
setVRMethod
(int method) Set the current method.void
setVRParams
(VRParameters newParams) void
update
(int updateType) Updates the VRControl depending on flag and passes update flag to the VRTabPanel (gui) and the VRMethods.Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDetectionMenu, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface PamController.PamSettings
getUnitType
Methods inherited from interface PamController.SettingsNameProvider
getUnitName
-
Field Details
-
vrTabPanelControl
Panel containing all gui components -
SETTINGS_CHANGE
public static final int SETTINGS_CHANGESome settings in the vrparams may have changed- See Also:
-
IMAGE_CHANGE
public static final int IMAGE_CHANGEThe image has changed- See Also:
-
IMAGE_SCALE_CHANGE
public static final int IMAGE_SCALE_CHANGEThe scale of the image has been changed.- See Also:
-
IMAGE_TIME_CHANGE
public static final int IMAGE_TIME_CHANGEThe time of the image has been changed.- See Also:
-
HEADING_UPDATE
public static final int HEADING_UPDATEThe heading of the image has been changed (usually manually).- See Also:
-
PITCH_UPDATE
public static final int PITCH_UPDATEThe pitch of the image has been changed (usually manually)- See Also:
-
TILT_UPDATE
public static final int TILT_UPDATEThe roll of the image has been changed (usually manually), note: roll is often referred to as tilt.- See Also:
-
METHOD_CHANGED
public static final int METHOD_CHANGEDThe vrMethod has changed- See Also:
-
REPAINT
public static final int REPAINTA repaint has been called.- See Also:
-
NOIMAGE
public static final int NOIMAGE- See Also:
-
MOUSEMOVED
public static final int MOUSEMOVEDThe mouse has moved on the display.- See Also:
-
LANDMARKGROUP_CHANGE
public static final int LANDMARKGROUP_CHANGEThe landmark group selection has been changed- See Also:
-
HEIGHT_CHANGE
public static final int HEIGHT_CHANGEThe height has been changed- See Also:
-
DBCOMMENTLENGTH
public static final int DBCOMMENTLENGTH- See Also:
-
-
Constructor Details
-
VRControl
-
-
Method Details
-
getMethods
Get an arraylist of all the vr methods currently available.- Returns:
-
setVRMethod
public void setVRMethod(int method) Set the current method.- Parameters:
method
- - integer specifying method position in vrMethods ArrayList.
-
getCurrentMethod
Get the current vr Method.- Returns:
-
getCalibrationMethod
Get the calibration method. Some dialogs require this.- Returns:
- the AddCalibration vrmethod
-
settingsButtonAWT
Opens the settings dialog and updates the module if new settings are saved.- Parameters:
frame
-tab
- - the tab to open the settings dialog on.
-
settingsButtonFX
public void settingsButtonFX(int tab) Opens settings pane which updates module settings- Parameters:
tab
- - which tab to open on. e.g. VRSettingsPane.HEIGHTTAB;
-
setVRParams
- Parameters:
newParams
-
-
pasteButton
public void pasteButton()Pastes an image from the computers clipboard. -
findNextFile
Find the next file which is approved by the Image file filter in the folder. Returns null if no file is found.- Parameters:
file
- - current file selected in the directory. If null the first file in the directory is chosen.filefilter
- - the file filter.forward
- - true move forward in the folder, false move backward in the folder.- Returns:
- the image file
-
selectHeight
public void selectHeight(int heightIndex) Set the current selected height- Parameters:
heightIndex
-
-
getCurrentHeight
public double getCurrentHeight()Get the current height of the camera from sea level. Includes any offset calulated by the tide manager.- Returns:
- the current height oif the camera from sea level- (this is fiorm the current sea level)
-
loadFile
Load an image file- Parameters:
file
- - image file.
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- Returns:
- true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
-
update
public void update(int updateType) Updates the VRControl depending on flag and passes update flag to the VRTabPanel (gui) and the VRMethods.- Parameters:
updateType
-
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnit
General notification when the PAMGAURD model changes.- Overrides:
notifyModelChanged
in classPamControlledUnit
- Parameters:
changeType
- type of change
-
getVrSubStatus
public int getVrSubStatus() -
newMousePoint
-
getImageName
- Returns:
-
getImageTimeString
Get the time of the current image.- Returns:
- the image date and time string.
-
getMeasuredAnimals
Get a list of the current measurements on the image- Returns:
- the current measurements on the image
-
getVRParams
Get the VR paramters class.- Returns:
- the vr params.
-
getVRPanel
Get the vr panel.- Returns:
-
getVRProcess
Get the VRProcess.- Returns:
- the vr process.
-
setMeasuredAnimals
-
getRangeMethods
-
setRangeMethods
-
getMapFileManager
Get the file manager for shore based method maps.- Returns:
- the map manager
-
getLocationManager
Get the location manager. This handles the location of the images.- Returns:
- the location manager
-
getTideManager
Get the tide manager. This handles tide imports.- Returns:
- tide imports.
-
setCurrentImage
Set the current image.- Parameters:
image
- - the current displayed image.
-
getCurrentImage
Get the current pam image.- Returns:
- the current image.
-
getVRTabPanel
-
getImageTime
public long getImageTime()Get the current image time in millis.- Returns:
- the current image time.
-
getImageDate
Get the date of the image.- Returns:
- the date of the image
-
getIMUListener
-
isFX
public boolean isFX()Check whether the GUI is FX or not.- Returns:
-
getTideImport
Get the import system for tide data.- Returns:
- the tideImport
-
getImageTimeParser
Get the current image time aprser- Returns:
-