[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/cvd_src corner_10.h corner_12.h corner_9...
From: |
Georg Klein |
Subject: |
[libcvd-members] libcvd/cvd_src corner_10.h corner_12.h corner_9... |
Date: |
Wed, 22 Aug 2007 16:55:48 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Georg Klein <georgklein> 07/08/22 16:55:48
Modified files:
cvd_src : corner_10.h corner_12.h corner_9.h
faster_corner_utilities.h
Log message:
Make is_corner_? actually check if things are a corner instead of
returning
always true or always false, resulting in a nice solid wall of corners
on
the left edge of the image for faster_corner_??. Works for the case of
9,
seems to be still broken for 10, not tested 12.
Note that is_corner_9 makes a visibly different set of corners to the
rest
of the image processed with faster_corner.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/corner_10.h?cvsroot=libcvd&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/corner_12.h?cvsroot=libcvd&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/corner_9.h?cvsroot=libcvd&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/faster_corner_utilities.h?cvsroot=libcvd&r1=1.1&r2=1.2
Patches:
Index: corner_10.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/corner_10.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- corner_10.h 26 Jan 2007 15:51:59 -0000 1.1
+++ corner_10.h 22 Aug 2007 16:55:47 -0000 1.2
@@ -1,5 +1,6 @@
-template <class C> inline bool is_corner_10(const byte* p, const int w, const
int t) {
+template <class C> inline bool is_corner_10(const byte* p, const int w, const
int barrier) {
const int w3 = 3*w;
+ const int t = C::prep_t(*p, barrier);
if (!C::eval(p[-1-w3],t)) { // ???????????????-
if (!C::eval(p[3+w],t)) { // ?????-?????????-
return false;
Index: corner_12.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/corner_12.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- corner_12.h 25 Jan 2007 15:40:04 -0000 1.1
+++ corner_12.h 22 Aug 2007 16:55:47 -0000 1.2
@@ -1,5 +1,6 @@
-template <class C> inline bool is_corner_12(const byte* p, const int w, const
int t) {
+template <class C> inline bool is_corner_12(const byte* p, const int w, const
int barrier) {
const int w3 = 3*w;
+ const int t = C::prep_t(*p, barrier);
if (!C::eval(p[-w3],t)) { // -???????????????
if (!C::eval(p[-3],t)) { // -???????????-???
return false;
Index: corner_9.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/corner_9.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- corner_9.h 26 Jan 2007 15:51:59 -0000 1.1
+++ corner_9.h 22 Aug 2007 16:55:47 -0000 1.2
@@ -1,5 +1,6 @@
-template <class C> inline bool is_corner_9(const byte* p, const int w, const
int t) {
+template <class C> inline bool is_corner_9(const byte* p, const int w, const
int barrier) {
const int w3 = 3*w;
+ const int t = C::prep_t(*p, barrier);
if (!C::eval(p[-1-w3],t)) { // ???????????????-
if (!C::eval(p[w3],t)) { // ????????-??????-
return false;
Index: faster_corner_utilities.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/faster_corner_utilities.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- faster_corner_utilities.h 11 Aug 2007 06:07:35 -0000 1.1
+++ faster_corner_utilities.h 22 Aug 2007 16:55:47 -0000 1.2
@@ -6,8 +6,28 @@
namespace CVD
{
- struct Less { template <class T1, class T2> static bool eval(const T1 a,
const T2 b) { return a < b; }};
- struct Greater { template <class T1, class T2> static bool eval(const T1
a, const T2 b) { return b < a; }};
+ struct Less
+ {
+ template <class T1, class T2> static bool eval(const T1 a, const T2 b)
+ {
+ return a < b;
+ }
+ static int prep_t(int pixel_val, int barrier)
+ {
+ return pixel_val - barrier;
+ }
+ };
+ struct Greater
+ {
+ template <class T1, class T2> static bool eval(const T1 a, const T2 b)
+ {
+ return a > b;
+ }
+ static int prep_t(int pixel_val, int barrier)
+ {
+ return pixel_val + barrier;
+ }
+ };
#define CHECK_BARRIER(lo, hi, other, flags) \
{ \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd/cvd_src corner_10.h corner_12.h corner_9...,
Georg Klein <=