Remove useless C headers

This commit is contained in:
Vincent Rabaud 2025-01-13 15:05:55 +01:00
parent 6931a4cc06
commit bfb54aa691
15 changed files with 12 additions and 28 deletions

View File

@ -1,5 +1,4 @@
#include "opencv2/core.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"

View File

@ -49,7 +49,6 @@
#define OPENCV_CALIB3D_UPNP_H_
#include "precomp.hpp"
#include "opencv2/core/core_c.h"
#include <iostream>
#if 0 // fix buffer overflow first (FIXIT mark in .cpp file)

View File

@ -40,7 +40,6 @@
//M*/
#include "test_precomp.hpp"
#include "opencv2/calib3d/calib3d_c.h"
namespace opencv_test { namespace {
@ -754,7 +753,7 @@ void CV_CameraCalibrationTest_CPP::calibrate(Size imageSize,
Mat(_objectPoints[i]).convertTo(objectPoints[i], CV_32F);
}
size_t nstddev0 = CV_CALIB_NINTRINSIC + imageCount*6, nstddev1 = nstddev0 + _imagePoints[0].size()*3;
size_t nstddev0 = CALIB_NINTRINSIC + imageCount*6, nstddev1 = nstddev0 + _imagePoints[0].size()*3;
for( i = nstddev0; i < nstddev1; i++ )
{
stdDevs[i] = 0.0;
@ -1433,12 +1432,12 @@ void CV_StereoCalibrationTest::run( int )
double rmsErrorFromStereoCalib = calibrateStereoCamera(objpt, imgpt1, imgpt2, M1, D1, M2, D2, imgsize, R, T, E, F,
rotMats1, transVecs1, rmsErrorPerView1, rmsErrorPerView2,
TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 30, 1e-6),
CV_CALIB_SAME_FOCAL_LENGTH
//+ CV_CALIB_FIX_ASPECT_RATIO
+ CV_CALIB_FIX_PRINCIPAL_POINT
+ CV_CALIB_ZERO_TANGENT_DIST
+ CV_CALIB_FIX_K3
+ CV_CALIB_FIX_K4 + CV_CALIB_FIX_K5 //+ CV_CALIB_FIX_K6
CALIB_SAME_FOCAL_LENGTH
//+ CALIB_FIX_ASPECT_RATIO
+ CALIB_FIX_PRINCIPAL_POINT
+ CALIB_ZERO_TANGENT_DIST
+ CALIB_FIX_K3
+ CALIB_FIX_K4 + CALIB_FIX_K5 //+ CALIB_FIX_K6
);
/* rmsErrorFromStereoCalib /= nframes*npoints; */
if (rmsErrorFromStereoCalib > maxReprojErr)

View File

@ -41,7 +41,6 @@
#include "test_precomp.hpp"
#include "test_chessboardgenerator.hpp"
#include "opencv2/core/types_c.h"
namespace opencv_test { namespace {
@ -232,8 +231,6 @@ protected:
void run(int /* start_from */ )
{
Mat zeros(1, sizeof(CvMat), CV_8U, Scalar(0));
Mat src_cpp(3, 1, CV_32F);
Mat dst_cpp(3, 3, CV_32F);

View File

@ -41,7 +41,6 @@
#include "test_precomp.hpp"
#include "test_chessboardgenerator.hpp"
#include "opencv2/calib3d/calib3d_c.h"
namespace opencv_test { namespace {
@ -89,7 +88,7 @@ void CV_ChessboardDetectorBadArgTest::run( int /*start_from */)
/* /*//*/ */
int errors = 0;
flags = CV_CALIB_CB_ADAPTIVE_THRESH | CV_CALIB_CB_NORMALIZE_IMAGE;
flags = CALIB_CB_ADAPTIVE_THRESH | CALIB_CB_NORMALIZE_IMAGE;
img = cb.clone();
initArgs();

View File

@ -1,5 +1,4 @@
#include "perf_precomp.hpp"
#include "opencv2/core/core_c.h"
namespace opencv_test
{

View File

@ -4,7 +4,6 @@
#include "precomp.hpp"
#include "opencv2/core/mat.hpp"
#include "opencv2/core/types_c.h"
#include "opencl_kernels_core.hpp"
#undef HAVE_IPP

View File

@ -4,7 +4,6 @@
#include "precomp.hpp"
#include "opencv2/core/mat.hpp"
#include "opencv2/core/types_c.h"
namespace cv {

View File

@ -6,7 +6,6 @@
#ifndef SRC_PERSISTENCE_HPP
#define SRC_PERSISTENCE_HPP
#include "opencv2/core/types_c.h"
#include <deque>
#include <sstream>
#include <string>

View File

@ -44,7 +44,6 @@
*/
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <limits>
#include "../3rdparty/mscr/chi_table.h"

View File

@ -40,7 +40,6 @@
//M*/
#include "test_precomp.hpp"
#include "opencv2/core/core_c.h"
namespace opencv_test { namespace {

View File

@ -6,7 +6,6 @@
#include "opencv2/ts.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc/imgproc_c.h"
namespace cv {

View File

@ -2,7 +2,6 @@
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include "perf_precomp.hpp"
#include "opencv2/imgproc/types_c.h"
namespace opencv_test {

View File

@ -573,8 +573,8 @@ public:
Mat bufferMat(image.rows, image.cols, CV_8UC4, buffer.bits, buffer.stride * 4);
switch (image.type()) {
case CV_8UC4: image.copyTo(bufferMat); break;
case CV_8UC3: cvtColor(image, bufferMat, CV_BGR2RGBA); break;
case CV_8UC1: cvtColor(image, bufferMat, CV_GRAY2RGBA); break;
case CV_8UC3: cvtColor(image, bufferMat, COLOR_BGR2RGBA); break;
case CV_8UC1: cvtColor(image, bufferMat, COLOR_GRAY2RGBA); break;
}
} else {
LOGE("Unknown surface buffer format: 0x%x", buffer.format);
@ -585,8 +585,8 @@ public:
//OpenCV doesn't support RGB to NV12 so we need to convert to YV12 and then manually changed it to NV12
Mat imageYV12;
switch (image.type()) {
case CV_8UC4: cvtColor(image, imageYV12, CV_RGBA2YUV_YV12); break;
case CV_8UC3: cvtColor(image, imageYV12, CV_BGR2YUV_YV12); break;
case CV_8UC4: cvtColor(image, imageYV12, COLOR_RGBA2YUV_YV12); break;
case CV_8UC3: cvtColor(image, imageYV12, COLOR_BGR2YUV_YV12); break;
case CV_8UC1: imageYV12.create(image.rows + image.rows/2, image.cols, CV_8UC1);
image.copyTo(imageYV12.rowRange(0, image.rows));
imageYV12.rowRange(image.rows, imageYV12.rows) = 128;

View File

@ -73,7 +73,6 @@
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <stdlib.h>
#include <stdio.h>