Hugin trunk 0.1
Loading...
Searching...
No Matches
LensCalTypes.cpp
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
2
11/*
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
16 *
17 * This software is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public
23 * License along with this software. If not, see
24 * <http://www.gnu.org/licenses/>.
25 *
26 */
27
28#include "panoinc_WX.h"
29#include "panoinc.h"
30#include "LensCalTypes.h"
31#include "base_wx/platform.h"
32
38
40{
41 delete m_panoImage;
42 if(m_edge)
43 delete m_edge;
44};
45
47{
48 unsigned int count=0;
49 for(unsigned int i=0;i<m_lines.size();i++)
50 {
52 count++;
53 };
54 return count;
55};
56
58{
59 if(m_edge)
60 delete m_edge;
62};
63
65{
66 return m_edge;
67};
68
70{
74 m_panoImage->setFilename(filenamestring);
77 if(m_panoImage->getCropFactor()<=0)
78 {
80 };
82 //reset roll to 0, it could be 90/-90/180 if loaded an image with Exif rotation tag
83 m_panoImage->setRoll(0);
84 //reset exposure value to prevent exposure correction when calculating corrected preview
85 m_panoImage->setExposureValue(0);
86};
87
92
97
102
104{
105 return m_lines;
106};
107
108void ImageLineList::ScaleLines(double scaleFactor)
109{
110 HuginLines::ScaleLines(m_lines,scaleFactor);
111};
112
declaration of helper class for LensCal
All variables of a source image.
bool applyEXIFValues(bool applyEVValue=true)
apply values found in EXIF data to SrcPanoImage class, call readEXIF() before to initialize some valu...
bool readCropfactorFromDB()
tries to read cropfactor from lens database you need to call SrcPanoImage::readEXIF before to fill so...
bool readProjectionFromDB(const bool ignoreFovRectilinear=true)
tries to read projection and crop area from lens database you need to call SrcPanoImage::readEXIF bef...
bool readEXIF()
try to fill out information about the image, by examining the exif data
const unsigned int GetNrOfValidLines()
returns the number of valid lines for given image
void ScaleLines(double scaleFactor)
scale all lines by given scaleFactor
HuginBase::SrcPanoImage * GetPanoImage()
return the SrcPanoImage from the given filename
void SetEdgeImage(vigra::BImage *newEdgeImage)
sets the edge detected image (old image will be deleted)
ImageLineList(wxString newFilename)
constructor
HuginLines::Lines m_lines
list of detected lines
vigra::BImage * m_edge
pointer to edge image
vigra::BImage * GetEdgeImage()
return pointer to edge image
const wxString GetFilename()
returns the filename
wxString m_filename
the filename
~ImageLineList()
destructor, cleans up
void SetFilename(wxString newFilename)
sets the filename, will also regenerated the m_panoImage
void SetLines(HuginLines::Lines lines)
store given lines in member variable
HuginBase::SrcPanoImage * m_panoImage
the HuginBase::SrcPanoImage, for generating the panorama class and necessary transformations
const HuginLines::Lines GetLines()
returns the list of detected lines
implementation of huginApp Class
#define HUGIN_CONV_FILENAME
Definition platform.h:40
void ScaleLines(Lines &lines, const double scale)
scales the given lines with given factor use in conjugation with HuginLines::detectEdges to scale the...
std::vector< SingleLine > Lines
vector of extracted lines from image
Definition LinesTypes.h:50
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.
Definition threshold.h:41