Commit cf25f572 authored by Andrey Kamaev's avatar Andrey Kamaev

Documentation: improved correctness checking for superclasses

parent dad75658
...@@ -247,12 +247,11 @@ def process_module(module, path): ...@@ -247,12 +247,11 @@ def process_module(module, path):
else: else:
# verify base # verify base
signature = doc.get("class", "") signature = doc.get("class", "")
signature = signature.replace(", public ", " ").replace(" public ", " ") signature = signature.replace(" public ", " ")
signature = signature.replace(", protected ", " ").replace(" protected ", " ") namespaceIdx = signature.rfind("::")
signature = signature.replace(", private ", " ").replace(" private ", " ")
signature = ("class " + signature).strip() signature = ("class " + signature).strip()
#hdrsignature = (cl[0] + " " + cl[1]).replace("class cv.", "class ").replace(".", "::").strip() hdrsignature = ("class " + name + " " + cl[1]).replace(".", "::").replace("cv::","").strip()
hdrsignature = ("class " + name + " " + cl[1]).replace(".", "::").strip()
if signature != hdrsignature: if signature != hdrsignature:
logerror(ERROR_003_INCORRECTBASE, "invalid base class documentation\ndocumented: " + signature + "\nactual: " + hdrsignature, doc) logerror(ERROR_003_INCORRECTBASE, "invalid base class documentation\ndocumented: " + signature + "\nactual: " + hdrsignature, doc)
......
...@@ -627,7 +627,7 @@ class CppHeaderParser(object): ...@@ -627,7 +627,7 @@ class CppHeaderParser(object):
classname = classname[1:] classname = classname[1:]
decl = [stmt_type + " " + self.get_dotted_name(classname), "", modlist, []] decl = [stmt_type + " " + self.get_dotted_name(classname), "", modlist, []]
if bases: if bases:
decl[1] = ": " + " ".join(bases) decl[1] = ": " + ", ".join([b if "::" in b else self.get_dotted_name(b).replace(".","::") for b in bases])
return stmt_type, classname, True, decl return stmt_type, classname, True, decl
if stmt.startswith("class") or stmt.startswith("struct"): if stmt.startswith("class") or stmt.startswith("struct"):
...@@ -642,7 +642,7 @@ class CppHeaderParser(object): ...@@ -642,7 +642,7 @@ class CppHeaderParser(object):
if ("CV_EXPORTS_W" in stmt) or ("CV_EXPORTS_AS" in stmt) or (not self.wrap_mode):# and ("CV_EXPORTS" in stmt)): if ("CV_EXPORTS_W" in stmt) or ("CV_EXPORTS_AS" in stmt) or (not self.wrap_mode):# and ("CV_EXPORTS" in stmt)):
decl = [stmt_type + " " + self.get_dotted_name(classname), "", modlist, []] decl = [stmt_type + " " + self.get_dotted_name(classname), "", modlist, []]
if bases: if bases:
decl[1] = ": " + " ".join(bases) decl[1] = ": " + ", ".join([b if "::" in b else self.get_dotted_name(b).replace(".","::") for b in bases])
return stmt_type, classname, True, decl return stmt_type, classname, True, decl
if stmt.startswith("enum"): if stmt.startswith("enum"):
......
...@@ -8,7 +8,7 @@ detail::Blender ...@@ -8,7 +8,7 @@ detail::Blender
.. ocv:class:: detail::Blender .. ocv:class:: detail::Blender
Base class for all blenders. :: Base class for all blenders. ::
class CV_EXPORTS Blender class CV_EXPORTS Blender
{ {
public: public:
...@@ -17,7 +17,7 @@ Base class for all blenders. :: ...@@ -17,7 +17,7 @@ Base class for all blenders. ::
enum { NO, FEATHER, MULTI_BAND }; enum { NO, FEATHER, MULTI_BAND };
static Ptr<Blender> createDefault(int type, bool try_gpu = false); static Ptr<Blender> createDefault(int type, bool try_gpu = false);
void prepare(const std::vector<Point> &corners, const std::vector<Size> &sizes); void prepare(const std::vector<Point> &corners, const std::vector<Size> &sizes);
virtual void prepare(Rect dst_roi); virtual void prepare(Rect dst_roi);
virtual void feed(const Mat &img, const Mat &mask, Point tl); virtual void feed(const Mat &img, const Mat &mask, Point tl);
virtual void blend(Mat &dst, Mat &dst_mask); virtual void blend(Mat &dst, Mat &dst_mask);
...@@ -48,7 +48,7 @@ Processes the image. ...@@ -48,7 +48,7 @@ Processes the image.
:param img: Source image :param img: Source image
:param mask: Source image mask :param mask: Source image mask
:param tl: Source image top-left corners :param tl: Source image top-left corners
detail::Blender::blend detail::Blender::blend
...@@ -64,7 +64,7 @@ Blends and returns the final pano. ...@@ -64,7 +64,7 @@ Blends and returns the final pano.
detail::FeatherBlender detail::FeatherBlender
---------------------- ----------------------
.. ocv:class:: detail::FeatherBlender : public Blender .. ocv:class:: detail::FeatherBlender : public detail::Blender
Simple blender which mixes images at its borders. :: Simple blender which mixes images at its borders. ::
...@@ -93,7 +93,7 @@ Simple blender which mixes images at its borders. :: ...@@ -93,7 +93,7 @@ Simple blender which mixes images at its borders. ::
detail::MultiBandBlender detail::MultiBandBlender
------------------------ ------------------------
.. ocv:class:: detail::MultiBandBlender : public Blender .. ocv:class:: detail::MultiBandBlender : public detail::Blender
Blender which uses multi-band blending algorithm (see [BA83]_). :: Blender which uses multi-band blending algorithm (see [BA83]_). ::
......
...@@ -54,7 +54,7 @@ Compensate exposure in the specified image. ...@@ -54,7 +54,7 @@ Compensate exposure in the specified image.
detail::NoExposureCompensator detail::NoExposureCompensator
----------------------------- -----------------------------
.. ocv:class:: detail::NoExposureCompensator : public ExposureCompensator .. ocv:class:: detail::NoExposureCompensator : public detail::ExposureCompensator
Stub exposure compensator which does nothing. :: Stub exposure compensator which does nothing. ::
...@@ -70,7 +70,7 @@ Stub exposure compensator which does nothing. :: ...@@ -70,7 +70,7 @@ Stub exposure compensator which does nothing. ::
detail::GainCompensator detail::GainCompensator
----------------------- -----------------------
.. ocv:class:: detail::GainCompensator : public ExposureCompensator .. ocv:class:: detail::GainCompensator : public detail::ExposureCompensator
Exposure compensator which tries to remove exposure related artifacts by adjusting image intensities, see [BL07]_ and [WJ10]_ for details. :: Exposure compensator which tries to remove exposure related artifacts by adjusting image intensities, see [BL07]_ and [WJ10]_ for details. ::
...@@ -90,7 +90,7 @@ Exposure compensator which tries to remove exposure related artifacts by adjusti ...@@ -90,7 +90,7 @@ Exposure compensator which tries to remove exposure related artifacts by adjusti
detail::BlocksGainCompensator detail::BlocksGainCompensator
----------------------------- -----------------------------
.. ocv:class:: detail::BlocksGainCompensator : public ExposureCompensator .. ocv:class:: detail::BlocksGainCompensator : public detail::ExposureCompensator
Exposure compensator which tries to remove exposure related artifacts by adjusting image block intensities, see [UES01]_ for details. :: Exposure compensator which tries to remove exposure related artifacts by adjusting image block intensities, see [UES01]_ for details. ::
......
...@@ -74,7 +74,7 @@ This method must implement features finding logic in order to make the wrappers ...@@ -74,7 +74,7 @@ This method must implement features finding logic in order to make the wrappers
detail::SurfFeaturesFinder detail::SurfFeaturesFinder
-------------------------- --------------------------
.. ocv:class:: detail::SurfFeaturesFinder : public FeaturesFinder .. ocv:class:: detail::SurfFeaturesFinder : public detail::FeaturesFinder
SURF features finder. :: SURF features finder. ::
...@@ -92,7 +92,7 @@ SURF features finder. :: ...@@ -92,7 +92,7 @@ SURF features finder. ::
detail::OrbFeaturesFinder detail::OrbFeaturesFinder
------------------------- -------------------------
.. ocv:class:: detail::OrbFeaturesFinder : public FeaturesFinder .. ocv:class:: detail::OrbFeaturesFinder : public detail::FeaturesFinder
ORB features finder. :: ORB features finder. ::
...@@ -212,7 +212,7 @@ This method must implement matching logic in order to make the wrappers `detail: ...@@ -212,7 +212,7 @@ This method must implement matching logic in order to make the wrappers `detail:
detail::BestOf2NearestMatcher detail::BestOf2NearestMatcher
----------------------------- -----------------------------
.. ocv:class:: detail::BestOf2NearestMatcher : public FeaturesMatcher .. ocv:class:: detail::BestOf2NearestMatcher : public detail::FeaturesMatcher
Features matcher which finds two best matches for each feature and leaves the best one only if the ratio between descriptor distances is greater than the threshold ``match_conf``. :: Features matcher which finds two best matches for each feature and leaves the best one only if the ratio between descriptor distances is greater than the threshold ``match_conf``. ::
......
...@@ -55,7 +55,7 @@ This method must implement camera parameters estimation logic in order to make t ...@@ -55,7 +55,7 @@ This method must implement camera parameters estimation logic in order to make t
detail::HomographyBasedEstimator detail::HomographyBasedEstimator
-------------------------------- --------------------------------
.. ocv:class:: detail::HomographyBasedEstimator : public Estimator .. ocv:class:: detail::HomographyBasedEstimator : public detail::Estimator
Homography based rotation estimator. :: Homography based rotation estimator. ::
...@@ -71,7 +71,7 @@ Homography based rotation estimator. :: ...@@ -71,7 +71,7 @@ Homography based rotation estimator. ::
detail::BundleAdjusterBase detail::BundleAdjusterBase
-------------------------- --------------------------
.. ocv:class:: detail::BundleAdjusterBase : public Estimator .. ocv:class:: detail::BundleAdjusterBase : public detail::Estimator
Base class for all camera parameters refinement methods. :: Base class for all camera parameters refinement methods. ::
...@@ -187,7 +187,7 @@ Gets the refined camera parameters. ...@@ -187,7 +187,7 @@ Gets the refined camera parameters.
detail::BundleAdjusterReproj detail::BundleAdjusterReproj
---------------------------- ----------------------------
.. ocv:class:: detail::BundleAdjusterReproj : public BundleAdjusterBase .. ocv:class:: detail::BundleAdjusterReproj : public detail::BundleAdjusterBase
Implementation of the camera parameters refinement algorithm which minimizes sum of the reprojection error squares. :: Implementation of the camera parameters refinement algorithm which minimizes sum of the reprojection error squares. ::
...@@ -204,7 +204,7 @@ Implementation of the camera parameters refinement algorithm which minimizes sum ...@@ -204,7 +204,7 @@ Implementation of the camera parameters refinement algorithm which minimizes sum
detail::BundleAdjusterRay detail::BundleAdjusterRay
------------------------- -------------------------
.. ocv:class:: detail::BundleAdjusterRay : public BundleAdjusterBase .. ocv:class:: detail::BundleAdjusterRay : public detail::BundleAdjusterBase
Implementation of the camera parameters refinement algorithm which minimizes sum of the distances between the rays passing through the camera center and a feature. :: Implementation of the camera parameters refinement algorithm which minimizes sum of the distances between the rays passing through the camera center and a feature. ::
......
...@@ -172,7 +172,7 @@ Base class for rotation-based warper using a `detail::ProjectorBase`_ derived cl ...@@ -172,7 +172,7 @@ Base class for rotation-based warper using a `detail::ProjectorBase`_ derived cl
detail::PlaneWarper detail::PlaneWarper
------------------- -------------------
.. ocv:class:: detail::PlaneWarper : public RotationWarperBase<PlaneProjector> .. ocv:class:: detail::PlaneWarper : public detail::RotationWarperBase<PlaneProjector>
Warper that maps an image onto the z = 1 plane. :: Warper that maps an image onto the z = 1 plane. ::
...@@ -209,7 +209,7 @@ Construct an instance of the plane warper class. ...@@ -209,7 +209,7 @@ Construct an instance of the plane warper class.
detail::SphericalWarper detail::SphericalWarper
----------------------- -----------------------
.. ocv:class:: detail::SphericalWarper : public RotationWarperBase<SphericalProjector> .. ocv:class:: detail::SphericalWarper : public detail::RotationWarperBase<SphericalProjector>
Warper that maps an image onto the unit sphere located at the origin. :: Warper that maps an image onto the unit sphere located at the origin. ::
...@@ -235,7 +235,7 @@ Construct an instance of the spherical warper class. ...@@ -235,7 +235,7 @@ Construct an instance of the spherical warper class.
detail::CylindricalWarper detail::CylindricalWarper
------------------------- -------------------------
.. ocv:class:: detail::CylindricalWarper : public RotationWarperBase<CylindricalProjector> .. ocv:class:: detail::CylindricalWarper : public detail::RotationWarperBase<CylindricalProjector>
Warper that maps an image onto the x*x + z*z = 1 cylinder. :: Warper that maps an image onto the x*x + z*z = 1 cylinder. ::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment