Skip to content

Commit d54639c

Browse files
committed
Update dates and versions, and mac OS and iOS dependencies. Don't store opencv in repo.
1 parent 97a79c9 commit d54639c

File tree

276 files changed

+26021
-84518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+26021
-84518
lines changed

Calibration.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "Calibration.hpp"
4040
#include <opencv2/calib3d/calib3d.hpp>
4141
#include <opencv2/imgproc/imgproc.hpp>
42+
#include <opencv2/core/core_c.h>
4243
#include "calc.hpp"
4344

4445
//
@@ -214,7 +215,7 @@ void *Calibration::cornerFinder(THREAD_HANDLE_T *threadHandle)
214215

215216
switch (cornerFinderDataPtr->patternType) {
216217
case CalibrationPatternType::CHESSBOARD:
217-
cornerFinderDataPtr->cornerFoundAllFlag = cv::findChessboardCorners(cv::cvarrToMat(cornerFinderDataPtr->calibImage), cornerFinderDataPtr->patternSize, cornerFinderDataPtr->corners, CV_CALIB_CB_FAST_CHECK|CV_CALIB_CB_ADAPTIVE_THRESH|CV_CALIB_CB_FILTER_QUADS);
218+
cornerFinderDataPtr->cornerFoundAllFlag = cv::findChessboardCorners(cv::cvarrToMat(cornerFinderDataPtr->calibImage), cornerFinderDataPtr->patternSize, cornerFinderDataPtr->corners, cv::CALIB_CB_FAST_CHECK|cv::CALIB_CB_ADAPTIVE_THRESH|cv::CALIB_CB_FILTER_QUADS);
218219
break;
219220
case CalibrationPatternType::CIRCLES_GRID:
220221
cornerFinderDataPtr->cornerFoundAllFlag = cv::findCirclesGrid(cv::cvarrToMat(cornerFinderDataPtr->calibImage), cornerFinderDataPtr->patternSize, cornerFinderDataPtr->corners, cv::CALIB_CB_SYMMETRIC_GRID);

Calibration.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
#include <ARX/AR/ar.h>
4242
#include <opencv2/core/core.hpp>
43+
#include <opencv2/core/types_c.h>
4344
#include <ARX/ARVideoSource.h>
4445
#include <map>
4546

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -x
1919
# Get our location.
2020
OURDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2121

22-
SDK_VERSION='1.0.6.1'
22+
SDK_VERSION='1.1'
2323
# If the version number includes a dev build number, drop it.
2424
SDK_VERSION_CANON=`echo -n "${SDK_VERSION}" | sed -E -e 's/([0-9]+\.[0-9]+\.[0-9]+)(\.[0-9])?/\1/'`
2525
# If the tiny version number is 0, drop it.
@@ -242,7 +242,7 @@ if [ $BUILD_WINDOWS ] ; then
242242
mkdir build-windows
243243
fi
244244

245-
SDK_FILENAME="artoolkitX.for.Windows.v${SDK_VERSION_PRETTY}.dmg"
245+
SDK_FILENAME="artoolkitX.for.Windows.v${SDK_VERSION_PRETTY}.zip"
246246
curl -f -o "${SDK_FILENAME}" --location "${SDK_URL_DIR}$(rawurlencode "${SDK_FILENAME}")"
247247

248248
(cd Windows

calc.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838

3939
#include "calc.hpp"
4040

41-
#include <opencv2/calib3d/calib3d.hpp>
42-
#include <opencv2/core/core_c.h>
41+
#include <opencv2/calib3d.hpp>
4342

4443
static void convParam(const float intr[3][4], const float dist[AR_DIST_FACTOR_NUM_MAX], const int xsize, const int ysize, const int dist_function_version, ARParam *param);
4544
static ARdouble getSizeFactor(ARdouble const dist_factor[AR_DIST_FACTOR_NUM_MAX], const int xsize, const int ysize, const int dist_function_version);
@@ -137,22 +136,22 @@ void calc(const int capturedImageNum,
137136
convParam(intr, dist, width, height, dist_function_version, &param);
138137
arParamDisp(&param);
139138

140-
CvMat *rotationVector;
141-
CvMat *rotationMatrix;
139+
cv::Mat rotationVector;
140+
cv::Mat rotationMatrix;
142141
double trans[3][4];
143142
ARdouble cx, cy, cz, hx, hy, h, sx, sy, ox, oy, err;
144143
ARdouble err_min = 1000000.0f, err_avg = 0.0f, err_max = 0.0f;
145-
rotationVector = cvCreateMat(1, 3, CV_32FC1);
146-
rotationMatrix = cvCreateMat(3, 3, CV_32FC1);
144+
rotationVector = cv::Mat(1, 3, CV_32FC1);
145+
rotationMatrix = cv::Mat(3, 3, CV_32FC1);
147146

148147
for (k = 0; k < capturedImageNum; k++) {
149148
for (i = 0; i < 3; i++) {
150-
((float *)(rotationVector->data.ptr))[i] = (float)rotationVectors.at(k).at<double>(i);
149+
((float *)(rotationVector.data))[i] = (float)rotationVectors.at(k).at<double>(i);
151150
}
152-
cvRodrigues2(rotationVector, rotationMatrix, 0);
151+
cv::Rodrigues(rotationVector, rotationMatrix);
153152
for (j = 0; j < 3; j++) {
154153
for (i = 0; i < 3; i++) {
155-
trans[j][i] = ((float *)(rotationMatrix->data.ptr + rotationMatrix->step*j))[i];
154+
trans[j][i] = rotationMatrix.at<float>(j, i);
156155
}
157156
trans[j][3] = (float)translationVectors.at(k).at<double>(j);
158157
}
@@ -192,9 +191,6 @@ void calc(const int capturedImageNum,
192191
*err_max_out = err_max;
193192

194193
*param_out = param;
195-
196-
cvReleaseMat(&rotationVector);
197-
cvReleaseMat(&rotationMatrix);
198194
}
199195

200196
static void convParam(const float intr[3][4], const float dist[AR_DIST_FACTOR_NUM_MAX], const int xsize, const int ysize, const int dist_function_version, ARParam *param)

calib_camera.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* are not obligated to do so. If you do not wish to do so, delete this exception
3333
* statement from your version.
3434
*
35+
* Copyright 2019-2023 Philip Lamb
3536
* Copyright 2018 Realmax, Inc.
3637
* Copyright 2015-2016 Daqri, LLC.
3738
* Copyright 2002-2015 ARToolworks, Inc.
@@ -237,7 +238,7 @@ static void startVideo(void)
237238
vs->configure(buf, true, NULL, NULL, 0);
238239
if (!vs->open()) {
239240
ARLOGe("Error: Unable to open video source.\n");
240-
EdenMessageShow((const unsigned char *)"Welcome to artoolkitX Camera Calibrator\n(c)2018 Realmax, Inc. & (c)2017 DAQRI LLC.\n\nUnable to open video source.\n\nPress 'p' for settings and help.");
241+
EdenMessageShow((const unsigned char *)"Welcome to artoolkitX Camera Calibrator\n(c)2023 artoolkitX Contributors.\n\nUnable to open video source.\n\nPress 'p' for settings and help.");
241242
}
242243
}
243244
gPostVideoSetupDone = false;
@@ -995,7 +996,7 @@ void drawView(void)
995996
vertices[i*8 + 7] = vs->getVideoHeight() - corners[i].y - 5.0f;
996997

997998
unsigned char buf[12]; // 10 digits in INT32_MAX, plus sign, plus null.
998-
sprintf((char *)buf, "%d\n", i);
999+
snprintf((char *)buf, sizeof(buf), "%d\n", i);
9991000

10001001
GLfloat mvp[16];
10011002
#if !HAVE_GLES2

depends/ios/include/jconfig.h

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,37 @@
1-
/* jconfig.h. Generated automatically by configure. */
2-
/* jconfig.cfg --- source file edited by configure script */
3-
/* see jconfig.doc for explanations */
4-
5-
#define HAVE_PROTOTYPES
6-
#define HAVE_UNSIGNED_CHAR
7-
#define HAVE_UNSIGNED_SHORT
8-
#undef void
9-
#undef const
10-
#undef CHAR_IS_UNSIGNED
11-
#define HAVE_STDDEF_H
12-
#define HAVE_STDLIB_H
13-
#undef NEED_BSD_STRINGS
14-
#undef NEED_SYS_TYPES_H
15-
#undef NEED_FAR_POINTERS
16-
#undef NEED_SHORT_EXTERNAL_NAMES
17-
/* Define this if you get warnings about undefined structures. */
18-
#undef INCOMPLETE_TYPES_BROKEN
19-
20-
#ifdef JPEG_INTERNALS
21-
22-
#undef RIGHT_SHIFT_IS_UNSIGNED
23-
#define INLINE __inline__
24-
/* These are for configuring the JPEG memory manager. */
25-
#undef DEFAULT_MAX_MEM
26-
#undef NO_MKTEMP
27-
28-
#endif /* JPEG_INTERNALS */
29-
30-
#ifdef JPEG_CJPEG_DJPEG
31-
32-
#define BMP_SUPPORTED /* BMP image file format */
33-
#define GIF_SUPPORTED /* GIF image file format */
34-
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
35-
#undef RLE_SUPPORTED /* Utah RLE image file format */
36-
#define TARGA_SUPPORTED /* Targa image file format */
37-
38-
#undef TWO_FILE_COMMANDLINE
39-
#undef NEED_SIGNAL_CATCHER
40-
#undef DONT_USE_B_MODE
41-
42-
/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
43-
#undef PROGRESS_REPORT
44-
45-
#endif /* JPEG_CJPEG_DJPEG */
1+
/* Version ID for the JPEG library.
2+
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
3+
*/
4+
#define JPEG_LIB_VERSION 62
5+
6+
/* libjpeg-turbo version */
7+
#define LIBJPEG_TURBO_VERSION 2.1.5
8+
9+
/* libjpeg-turbo version in integer form */
10+
#define LIBJPEG_TURBO_VERSION_NUMBER 2001005
11+
12+
/* Support arithmetic encoding */
13+
#define C_ARITH_CODING_SUPPORTED 1
14+
15+
/* Support arithmetic decoding */
16+
#define D_ARITH_CODING_SUPPORTED 1
17+
18+
/* Support in-memory source/destination managers */
19+
#define MEM_SRCDST_SUPPORTED 1
20+
21+
/* Use accelerated SIMD routines. */
22+
#define WITH_SIMD 1
23+
24+
/*
25+
* Define BITS_IN_JSAMPLE as either
26+
* 8 for 8-bit sample values (the usual setting)
27+
* 12 for 12-bit sample values
28+
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
29+
* JPEG standard, and the IJG code does not support anything else!
30+
* We do not support run-time selection of data precision, sorry.
31+
*/
32+
33+
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
34+
35+
/* Define if your (broken) compiler shifts signed values as if they were
36+
unsigned. */
37+
/* #undef RIGHT_SHIFT_IS_UNSIGNED */

0 commit comments

Comments
 (0)