31#include "vigra/transformimage.hxx"
75 vigra::Point2D
pos(e.GetPosition().x,e.GetPosition().y);
100 for(
unsigned int i=0;
i<
lines.size();
i++)
104 for(
unsigned int j=0;
j<
lines[
i].line.size();
j++)
165 for(
unsigned int i=0;
i<
lines.size();
i++)
167 if(
lines[
i].line.size()<2)
181 for(
unsigned int j=0;
j<
lines[
i].line.size()-1;
j++)
203 memDC.DrawLine(x1,y1,x2,y2);
278 ImageCache::EntryPtr img = ImageCache::getInstance().getImage(filename);
295 m_img.Create(0,0,
true);
341vigra::RGBValue<vigra::UInt8>
gray2RGB(vigra::UInt8
const&
v)
343 return vigra::RGBValue<vigra::UInt8>(
v,
v,
v);
383 ImageCache::EntryPtr img = ImageCache::getInstance().getImage(filename);
declaration of application class for lens calibrate application
vigra::RGBValue< vigra::UInt8 > gray2RGB(vigra::UInt8 const &v)
declaration of preview for lens calibration gui
Contains functions to transform whole images.
struct to hold a image state for stitching
void setHFOV(double h, bool keepView=true)
set the horizontal field of view.
void setProjection(ProjectionFormat f)
set the Projection format and adjust the hfov/vfov if nessecary
void setHeight(unsigned int h)
set panorama height
const vigra::Rect2D & getROI() const
void setWidth(unsigned int w, bool keepView=true)
set panorama width keep the HFOV, if keepView=true
void setROI(const vigra::Rect2D &val)
unsigned int getWidth() const
unsigned int getHeight() const
get panorama height
void setVar(const std::string &name, double val)
static double calcHFOV(SrcPanoImage::Projection proj, double fl, double crop, vigra::Size2D imageSize)
calculate hfov of an image given focal length, image size and crop factor
HuginBase::SrcPanoImage * GetPanoImage()
return the SrcPanoImage from the given filename
vigra::BImage * GetEdgeImage()
return pointer to edge image
const wxString GetFilename()
returns the filename
void SetLines(HuginLines::Lines lines)
store given lines in member variable
const HuginLines::Lines GetLines()
returns the list of detected lines
xrc handler for LensCalImageCtrl
virtual bool CanHandle(wxXmlNode *node)
virtual wxObject * DoCreateResource()
image previewer for lens calibration GUI
LensCalPreviewMode m_previewMode
which image should be drawn
void SetShowLines(bool showLines)
void DrawView()
draw the view into the offscreen buffer
void SetMode(const LensCalPreviewMode newMode)
set which image (original, edge, remapped/corrected) should be drawn
LensCalImageCtrl()
constructor
wxBitmap m_scaled_img
the scaled image to save resizing
wxImage m_img
the image to adjust (full scale)
HuginBase::PanoramaOptions m_opts
HuginBase::SrcPanoImage::Projection m_projection
void SetLensDistortions(const double newA, const double newB, const double newC, const double newD, const double newE)
updates the internal values of the lens distortions parameters (needed only for remapped image)
void OnPaint(wxPaintEvent &dc)
paint event
HuginBase::SrcPanoImage m_panoimage
wxBitmap m_display_img
the image to display, e.g.
float m_scale
scale factor for scaling from m_img to m_scaled_img
void SetLens(const HuginBase::SrcPanoImage::Projection newProjection, const double newFocallength, const double newCropfactor)
updates the internal values of the lens (needed only for remapped image)
cmsHPROFILE m_monitorProfile
monitor profile
wxImage m_remapped_img
the remapped image as wxImage
vigra::BRGBImage m_edgeImage
the edge image as RGBImage (in m_imageLines the edge image is grayscale (vigra::BImage))
unsigned int m_imageIndex
const LensCalPreviewMode GetMode()
return actual preview mode
void SetEdgeImage()
converts the edge image into wxImage
vigra::BRGBImage m_remappedImage
the remapped image
void Resize(wxSizeEvent &e)
resize event, recalculates the offscreen buffer
void SetImage(ImageLineList *newList, unsigned int newIndex)
set preview setting to given ImageLineList
ImageLineList * m_imageLines
struct with filename, edge image and detected lines
void SetEmptyImage()
set preview to empty image
void OnMouseEvent(wxMouseEvent &e)
void GenerateRemappedImage(const unsigned int newWidth, const unsigned int newHeight)
generates the remapped image suitable for wxImage
bool m_hasMonitorProfile
true, if we found a real monitor profile
wxImage m_edge
the edge detect image (resized scale)
bool m_showLines
true, if the lines should be drawn above the image
void CorrectImage(wxImage &image, const vigra::ImageImportInfo::ICCProfile &iccProfile, const cmsHPROFILE &monitorProfile)
apply color correction to given image using input iccProfile and monitor profile
void GetMonitorProfile(wxString &profileName, cmsHPROFILE &profile)
retrieve monitor profile from system
std::vector< SingleLine > Lines
vector of extracted lines from image
include file for the hugin project
include file for the hugin project
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
wxImage imageCacheEntry2wxImage(ImageCache::EntryPtr e)