-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
221 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "ident.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef OCV_AR_IDENT_H | ||
#define OCV_AR_IDENT_H | ||
|
||
#include <opencv2/opencv.hpp> | ||
|
||
#include "marker.h" | ||
#include "types.h" | ||
|
||
namespace ocv_ar { | ||
|
||
class IdentificatorBase { | ||
public: | ||
IdentificatorBase(int markerSize) : reqMarkerSize(markerSize) {}; | ||
|
||
virtual ~IdentificatorBase() {}; | ||
|
||
virtual bool readMarkerCode(cv::Mat &area, Marker &marker) = 0; | ||
|
||
virtual int getRequiredMarkerSize() const { return reqMarkerSize; } | ||
|
||
static IdentificatorType getType() { return type; } | ||
|
||
protected: | ||
virtual bool checkMarkerCode(const cv::Mat &m, int dir) const = 0; | ||
virtual int markerCodeToId(const cv::Mat &m, int dir) const = 0; | ||
|
||
|
||
static IdentificatorType type; | ||
|
||
int reqMarkerSize; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "ident_7bit.h" | ||
|
||
using namespace ocv_ar; | ||
|
||
IdentificatorType IdentificatorBase::type = CODE_7BIT; | ||
|
||
bool Identificator7BitCode::readMarkerCode(cv::Mat &area, Marker &marker) { | ||
return false; | ||
} | ||
|
||
bool Identificator7BitCode::checkMarkerCode(const cv::Mat &m, int dir) const { | ||
return false; | ||
} | ||
|
||
int Identificator7BitCode::markerCodeToId(const cv::Mat &m, int dir) const { | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef OCV_AR_IDENT_7BIT_H | ||
#define OCV_AR_IDENT_7BIT_H | ||
|
||
#include <opencv2/opencv.hpp> | ||
|
||
#include "marker.h" | ||
#include "types.h" | ||
#include "ident.h" | ||
|
||
namespace ocv_ar { | ||
|
||
class Identificator7BitCode : public IdentificatorBase { | ||
public: | ||
Identificator7BitCode() : IdentificatorBase(56) {}; | ||
|
||
|
||
virtual bool readMarkerCode(cv::Mat &area, Marker &marker); | ||
|
||
protected: | ||
virtual bool checkMarkerCode(const cv::Mat &m, int dir) const; | ||
virtual int markerCodeToId(const cv::Mat &m, int dir) const; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters