public class VRControl extends PamControlledUnit implements PamSettings
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
Modifier and Type | Field and Description |
---|---|
static int |
DBCOMMENTLENGTH |
static int |
HEADING_UPDATE
The heading of the image has been changed (usually manually).
|
static int |
IMAGE_CHANGE
The image has changed
|
static int |
IMAGE_SCALE_CHANGE
The scale of the image has been changed.
|
static int |
IMAGE_TIME_CHANGE
The time of the image has been changed.
|
static int |
METHOD_CHANGED
The vrMethod has changed
|
static int |
NOIMAGE |
static int |
PITCH_UPDATE
The pitch of the image has been changed (usually manually)
|
static int |
SETTINGS_CHANGE
Some settings in the vrparams may have changed
|
static int |
TILT_UPDATE
The roll of the image has been changed (usually manually), note: roll is often referred to as tilt.
|
VRTabPanelControl |
vrTabPanelControl
Panel containing all gui components
|
Constructor and Description |
---|
VRControl(java.lang.String unitName) |
Modifier and Type | Method and Description |
---|---|
void |
fileButton()
Opens a file browser and loads the selected image/folder.
|
java.io.File |
findNextFile(java.io.File file,
ImageFileFilter filefilter,
boolean forward)
Find the next file which is approved by the Image file filter in the folder.
|
AddCalibrationMethod |
getCalibrationMethod()
Get the calibration method.
|
double |
getCurrentHeight()
Get the current height of the camera from sea level.
|
PamImage |
getCurrentImage() |
VRMethod |
getCurrentMethod()
Get the current vr Method.
|
java.util.Date |
getImageDate() |
java.lang.String |
getImageName() |
long |
getImageTime() |
java.lang.String |
getImageTimeString() |
IMUListener |
getIMUListener() |
LocationManager |
getLocationManager() |
MapFileManager |
getMapFileManager() |
java.util.ArrayList<VRMeasurement> |
getMeasuredAnimals() |
java.util.ArrayList<VRMethod> |
getMethods()
Get an arraylist of all the vr methods currently available.
|
VRHorzMethods |
getRangeMethods() |
java.io.Serializable |
getSettingsReference() |
long |
getSettingsVersion() |
TideManager |
getTideManager() |
VRPanel |
getVRPanel() |
VRParameters |
getVRParams() |
VRProcess |
getVRProcess() |
int |
getVrSubStatus() |
VRTabPanelControl |
getVRTabPanel() |
void |
loadFile(java.io.File file)
Load an image file
|
void |
newMousePoint(java.awt.Point mousePoint) |
void |
notifyModelChanged(int changeType)
General notification when the PAMGAURD model changes.
|
void |
pasteButton()
Pastes an image from the computers clipboard.
|
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) |
void |
selectHeight(int heightIndex)
Set the current selected height
|
void |
setCurrentImage(PamImage image) |
void |
setImageBrightness(float brightness,
float contrast)
Se the image brightness
|
void |
setMeasuredAnimals(java.util.ArrayList<VRMeasurement> measuredAnimals) |
void |
setRangeMethods(VRHorzMethods rangeMethods) |
void |
settingsButton(javax.swing.JFrame frame,
int tab)
Opens the settings dialog and updates the module if new settings are saved.
|
void |
setVRMethod(int method)
Set the current method.
|
void |
update(int updateType)
Updates the VRControl depending on flag and passes update flag to the VRTabPanel (gui) and the VRMethods.
|
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addRelatedMenuItems, addXMLParameter, addXMLParameter, addXMLParameter, addXMLParameter, canClose, canPlayViewerSound, createDetectionMenu, createDisplayMenu, createFileMenu, createHelpMenu, fillXMLElement, flushDataBlockBuffers, getFrameNumber, getGuiFrame, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineTaskGroup, getPamController, getPamModuleInfo, getPamProcess, getPamView, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setupControlledUnit, stopViewerSound, terminalPrint, terminalPrintln, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUnitName, getUnitType
public VRTabPanelControl vrTabPanelControl
public static final int SETTINGS_CHANGE
public static final int IMAGE_CHANGE
public static final int IMAGE_SCALE_CHANGE
public static final int IMAGE_TIME_CHANGE
public static final int HEADING_UPDATE
public static final int PITCH_UPDATE
public static final int TILT_UPDATE
public static final int METHOD_CHANGED
public static final int NOIMAGE
public static final int DBCOMMENTLENGTH
public java.util.ArrayList<VRMethod> getMethods()
public void setVRMethod(int method)
method-
- integer specifying method position in vrMethods ArrayList.public VRMethod getCurrentMethod()
public AddCalibrationMethod getCalibrationMethod()
public void settingsButton(javax.swing.JFrame frame, int tab)
frame
- tab-
- the tab to open the settings dialog on.public void pasteButton()
public void fileButton()
public java.io.File findNextFile(java.io.File file, ImageFileFilter filefilter, boolean forward)
file-
- current file selected in the directory. If null the first file in the directory is chosen.filefilter
- forward-
- true move forward in the folder, false move backward in the folder.public void selectHeight(int heightIndex)
heightIndex
- public double getCurrentHeight()
public void setImageBrightness(float brightness, float contrast)
brightness
- contrast
- public void loadFile(java.io.File file)
file-
- image file.public java.io.Serializable getSettingsReference()
getSettingsReference
in interface PamSettings
public long getSettingsVersion()
getSettingsVersion
in interface PamSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings
in interface PamSettings
public void update(int updateType)
updateType
- public void notifyModelChanged(int changeType)
PamControlledUnit
notifyModelChanged
in class PamControlledUnit
changeType
- type of changepublic int getVrSubStatus()
public void newMousePoint(java.awt.Point mousePoint)
public java.lang.String getImageName()
public java.lang.String getImageTimeString()
public java.util.ArrayList<VRMeasurement> getMeasuredAnimals()
public VRParameters getVRParams()
public VRPanel getVRPanel()
public VRProcess getVRProcess()
public void setMeasuredAnimals(java.util.ArrayList<VRMeasurement> measuredAnimals)
public VRHorzMethods getRangeMethods()
public void setRangeMethods(VRHorzMethods rangeMethods)
public MapFileManager getMapFileManager()
public LocationManager getLocationManager()
public TideManager getTideManager()
public void setCurrentImage(PamImage image)
public PamImage getCurrentImage()
public VRTabPanelControl getVRTabPanel()
public long getImageTime()
public java.util.Date getImageDate()
public IMUListener getIMUListener()