Updated warning options for GCC; fixed new warnings.

This commit is contained in:
Andrey Kamaev 2012-06-20 12:27:02 +00:00
parent 779f4e39de
commit d48d7b2b46
50 changed files with 2055 additions and 1808 deletions

View File

@ -23,7 +23,7 @@ if(MSVC)
add_definitions(-DJAS_WIN_MSVC_BUILD)
endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes -Wmissing-declarations -Wunused -Wshadow
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes -Wmissing-declarations -Wunused -Wshadow -Wsign-compare
/wd4013 /wd4018 /wd4715 /wd4244 /wd4101 /wd4267)
if(UNIX)

View File

@ -25,7 +25,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(jcdctmgr.c PROPERTIES COMPILE_FLAGS "-O1")
endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wcast-align -Wshadow)
ocv_warnings_disable(CMAKE_C_FLAGS -Wcast-align -Wshadow -Wunused)
set_target_properties(${JPEG_LIBRARY}
PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY}

View File

@ -81,18 +81,15 @@ set(lib_srcs
if(UNIX)
list(APPEND lib_srcs tif_unix.c)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
set_source_files_properties(tif_unix.c PROPERTIES COMPILE_FLAGS "-w")
endif()
endif()
if(WIN32)
list(APPEND lib_srcs tif_win32.c)
endif(WIN32)
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wunused -Wsign-compare
-Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations /wd4100 /wd4244 /wd4706 /wd4127 /wd4701 /wd4018 /wd4267 /wd4306 /wd4305 /wd4312 /wd4311)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter /wd4100 /wd4244 /wd4706 /wd4127 /wd4701 /wd4018 /wd4267 /wd4306 /wd4305 /wd4312 /wd4311)
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

View File

@ -58,6 +58,7 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX)
# High level of warnings.
add_extra_compiler_option(-W)
add_extra_compiler_option(-Wall)
add_extra_compiler_option(-Werror=return-type)
add_extra_compiler_option(-Werror=non-virtual-dtor)
@ -72,6 +73,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-Winit-self)
add_extra_compiler_option(-Wpointer-arith)
add_extra_compiler_option(-Wshadow)
add_extra_compiler_option(-Wsign-promo)
if(ENABLE_NOISY_WARNINGS)
add_extra_compiler_option(-Wcast-align)
@ -81,6 +83,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
add_extra_compiler_option(-Wno-unnamed-type-template-args)
endif()
add_extra_compiler_option(-fdiagnostics-show-option)
# The -Wno-long-long is required in 64bit systems when including sytem headers.
if(X86_64)

View File

@ -30,10 +30,7 @@
# Advanced variables:
# - OpenCV_SHARED
# - OpenCV_CONFIG_PATH
# - OpenCV_INSTALL_PATH (not set on Windows)
# - OpenCV_LIB_COMPONENTS
# - OpenCV_USE_MANGLED_PATHS
# - OpenCV_HAVE_ANDROID_CAMERA
#
# ===================================================================================
#
@ -41,6 +38,13 @@
# - OpenCV_STATIC
# - OpenCV_CUDA
if(CMAKE_VERSION VERSION_GREATER 2.6)
get_property(OpenCV_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
if(NOT ";${OpenCV_LANGUAGES};" MATCHES ";CXX;")
enable_language(CXX)
endif()
endif()
if(NOT DEFINED OpenCV_STATIC)
# look for global setting
if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)

View File

@ -34,6 +34,7 @@ endmacro()
set(OCV_COMPILER_FAIL_REGEX
"command line option .* is valid for .* but not for C\\+\\+" # GNU
"command line option .* is valid for .* but not for C" # GNU
"unrecognized .*option" # GNU
"unknown .*option" # Clang
"ignoring unknown option" # MSVC

View File

@ -340,7 +340,7 @@ CameraActivity::~CameraActivity()
disconnect();
}
bool CameraActivity::onFrameBuffer(void* buffer, int bufferSize)
bool CameraActivity::onFrameBuffer(void* /*buffer*/, int /*bufferSize*/)
{
LOGD("CameraActivity::onFrameBuffer - empty callback");
return true;

View File

@ -426,7 +426,7 @@ void BasicRetinaFilter::_spatiotemporalLPfilter(const float *inputFrame, float *
}
// run SQUARING LP filter for a new frame input and save result at a specific output adress
const float BasicRetinaFilter::_squaringSpatiotemporalLPfilter(const float *inputFrame, float *outputFrame, const unsigned int filterIndex)
float BasicRetinaFilter::_squaringSpatiotemporalLPfilter(const float *inputFrame, float *outputFrame, const unsigned int filterIndex)
{
unsigned int coefTableOffset=filterIndex*3;
/**********/
@ -597,7 +597,7 @@ void BasicRetinaFilter::_squaringHorizontalCausalFilter(const float *inputFrame,
}
// vertical anticausal filter that returns the mean value of its result
const float BasicRetinaFilter::_verticalAnticausalFilter_returnMeanValue(float *outputFrame, unsigned int IDcolumnStart, unsigned int IDcolumnEnd)
float BasicRetinaFilter::_verticalAnticausalFilter_returnMeanValue(float *outputFrame, unsigned int IDcolumnStart, unsigned int IDcolumnEnd)
{
register float meanValue=0;
float* offset=outputFrame+_filterOutput.getNBpixels()-_filterOutput.getNBcolumns();

View File

@ -299,7 +299,7 @@ public:
/**
* @return the v0 compression parameter used to compute the local adaptation
*/
const float getV0CompressionParameter(){ return _v0/_maxInputValue;};
float getV0CompressionParameter(){ return _v0/_maxInputValue;};
/**
* @return the output result of the object
@ -309,17 +309,17 @@ public:
/**
* @return number of rows of the filter
*/
inline const unsigned int getNBrows(){return _filterOutput.getNBrows();};
inline unsigned int getNBrows(){return _filterOutput.getNBrows();};
/**
* @return number of columns of the filter
*/
inline const unsigned int getNBcolumns(){return _filterOutput.getNBcolumns();};
inline unsigned int getNBcolumns(){return _filterOutput.getNBcolumns();};
/**
* @return number of pixels of the filter
*/
inline const unsigned int getNBpixels(){return _filterOutput.getNBpixels();};
inline unsigned int getNBpixels(){return _filterOutput.getNBpixels();};
/**
* force filter output to be normalized between 0 and maxValue
@ -342,7 +342,7 @@ public:
/**
* @return the maximum input buffer value
*/
inline const float getMaxInputValue(){return this->_maxInputValue;};
inline float getMaxInputValue(){return this->_maxInputValue;};
/**
* @return the maximum input buffer value
@ -382,7 +382,7 @@ protected:
// Basic low pass spation temporal low pass filter used by each retina filters
void _spatiotemporalLPfilter(const float *inputFrame, float *LPfilterOutput, const unsigned int coefTableOffset=0);
const float _squaringSpatiotemporalLPfilter(const float *inputFrame, float *outputFrame, const unsigned int filterIndex=0);
float _squaringSpatiotemporalLPfilter(const float *inputFrame, float *outputFrame, const unsigned int filterIndex=0);
// LP filter with an irregular spatial filtering
@ -409,7 +409,7 @@ protected:
// 1D filters with image input that is squared in the function
void _squaringHorizontalCausalFilter(const float *inputFrame, float *outputFrame, unsigned int IDrowStart, unsigned int IDrowEnd);
// vertical anticausal filter that returns the mean value of its result
const float _verticalAnticausalFilter_returnMeanValue(float *outputFrame, unsigned int IDcolumnStart, unsigned int IDcolumnEnd);
float _verticalAnticausalFilter_returnMeanValue(float *outputFrame, unsigned int IDcolumnStart, unsigned int IDcolumnEnd);
// most simple functions: only perform 1D filtering with output=input (no add on)
void _horizontalCausalFilter(float *outputFrame, unsigned int IDrowStart, unsigned int IDrowEnd);

View File

@ -222,7 +222,7 @@ void CvHybridTracker::updateTrackerWithEM(Mat image) {
curr_center.y = (float)em_means.at<float>(0, 1);
}
void CvHybridTracker::updateTrackerWithLowPassFilter(Mat image) {
void CvHybridTracker::updateTrackerWithLowPassFilter(Mat) {
RotatedRect ms_track = mstracker->getTrackingEllipse();
Point2f ft_center = fttracker->getTrackingCenter();

View File

@ -156,19 +156,19 @@ public:
/**
* @return the numbers of rows (height) of the images OUTPUTS of the object
*/
inline const unsigned int getOutputNBrows(){return _outputNBrows;};
inline unsigned int getOutputNBrows(){return _outputNBrows;};
/**
* @return the numbers of columns (width) of the images OUTPUTS of the object
*/
inline const unsigned int getOutputNBcolumns(){return _outputNBcolumns;};
inline unsigned int getOutputNBcolumns(){return _outputNBcolumns;};
/**
* main funtion of the class: run projection function
* @param size: one of the input frame initial dimensions to be processed
* @return the output frame dimension
*/
inline static const unsigned int predictOutputSize(const unsigned int size, const double reductionFactor){return (unsigned int)((double)size/reductionFactor);};
inline static unsigned int predictOutputSize(const unsigned int size, const double reductionFactor){return (unsigned int)((double)size/reductionFactor);};
/**
* @return the output of the filter which applies an irregular Low Pass spatial filter to the imag input (see function
@ -187,7 +187,7 @@ public:
*/
inline const std::valarray<unsigned int> &getSamplingMap() const {return _transformTable;};
inline const double getOriginalRadiusLength(const double projectedRadiusLength){return _azero/(_alim-projectedRadiusLength*2.0/_minDimension);};
inline double getOriginalRadiusLength(const double projectedRadiusLength){return _azero/(_alim-projectedRadiusLength*2.0/_minDimension);};
// unsigned int getInputPixelIndex(const unsigned int ){ return _transformTable[index*2+1]};

View File

@ -44,6 +44,7 @@ namespace cv
FindClose(hFind);
}
#else
(void)addPath;
DIR *dp;
struct dirent *dirp;
if((dp = opendir(path.c_str())) == NULL)
@ -101,6 +102,7 @@ namespace cv
}
#else
(void)addPath;
DIR *dp;
struct dirent *dirp;
if((dp = opendir(path_f.c_str())) == NULL)

View File

@ -170,7 +170,7 @@ public:
/**
* @return the horizontal cells' temporal constant
*/
inline const float getTemporalConstant(){return this->_filteringCoeficientsTable[2];};
inline float getTemporalConstant(){return this->_filteringCoeficientsTable[2];};
private:

View File

@ -195,12 +195,12 @@ public:
/**
* @return the photoreceptors's temporal constant
*/
inline const float getPhotoreceptorsTemporalConstant(){return this->_filteringCoeficientsTable[2];};
inline float getPhotoreceptorsTemporalConstant(){return this->_filteringCoeficientsTable[2];};
/**
* @return the horizontal cells' temporal constant
*/
inline const float getHcellsTemporalConstant(){return this->_filteringCoeficientsTable[5];};
inline float getHcellsTemporalConstant(){return this->_filteringCoeficientsTable[5];};
private:
// template buffers

View File

@ -687,7 +687,7 @@ void RetinaColor::_computeGradient(const float *luminance)
}
}
const bool RetinaColor::applyKrauskopfLMS2Acr1cr2Transform(std::valarray<float> &result)
bool RetinaColor::applyKrauskopfLMS2Acr1cr2Transform(std::valarray<float> &result)
{
bool processSuccess=true;
// basic preliminary error check
@ -703,7 +703,7 @@ const bool RetinaColor::applyKrauskopfLMS2Acr1cr2Transform(std::valarray<float>
return processSuccess;
}
const bool RetinaColor::applyLMS2LabTransform(std::valarray<float> &result)
bool RetinaColor::applyLMS2LabTransform(std::valarray<float> &result)
{
bool processSuccess=true;
// basic preliminary error check

View File

@ -163,14 +163,14 @@ public:
* @param result: the input buffer to fill with the transformed colorspace retina output
* @return true if process ended successfully
*/
const bool applyKrauskopfLMS2Acr1cr2Transform(std::valarray<float> &result);
bool applyKrauskopfLMS2Acr1cr2Transform(std::valarray<float> &result);
/**
* apply to the retina color output the CIE Lab color transformation
* @param result: the input buffer to fill with the transformed colorspace retina output
* @return true if process ended successfully
*/
const bool applyLMS2LabTransform(std::valarray<float> &result);
bool applyLMS2LabTransform(std::valarray<float> &result);
/**
* @return the multiplexed frame result (use this after function runColorMultiplexing)

View File

@ -240,7 +240,7 @@ namespace cv
_setInitPeriodCount();
}
const bool RetinaFilter::checkInput(const std::valarray<float> &input, const bool)
bool RetinaFilter::checkInput(const std::valarray<float> &input, const bool)
{
BasicRetinaFilter *inputTarget=&_photoreceptorsPrefilter;
@ -259,7 +259,7 @@ namespace cv
}
// main function that runs the filter for a given input frame
const bool RetinaFilter::runFilter(const std::valarray<float> &imageInput, const bool useAdaptiveFiltering, const bool processRetinaParvoMagnoMapping, const bool useColorMode, const bool inputIsColorMultiplexed)
bool RetinaFilter::runFilter(const std::valarray<float> &imageInput, const bool useAdaptiveFiltering, const bool processRetinaParvoMagnoMapping, const bool useColorMode, const bool inputIsColorMultiplexed)
{
// preliminary check
bool processSuccess=true;
@ -488,7 +488,7 @@ namespace cv
}
const bool RetinaFilter::getParvoFoveaResponse(std::valarray<float> &parvoFovealResponse)
bool RetinaFilter::getParvoFoveaResponse(std::valarray<float> &parvoFovealResponse)
{
if (!_useParvoOutput)
return false;
@ -508,7 +508,7 @@ namespace cv
}
// method to retrieve the parafoveal magnocellular pathway response (no energy motion in fovea)
const bool RetinaFilter::getMagnoParaFoveaResponse(std::valarray<float> &magnoParafovealResponse)
bool RetinaFilter::getMagnoParaFoveaResponse(std::valarray<float> &magnoParafovealResponse)
{
if (!_useMagnoOutput)
return false;

View File

@ -151,7 +151,7 @@ public:
* @param colorMode: specifiy if the input should be considered by the retina as colored of not
* @return false if not compatible or it returns true if OK
*/
const bool checkInput(const std::valarray<float> &input, const bool colorMode);
bool checkInput(const std::valarray<float> &input, const bool colorMode);
/**
* run the initilized retina filter, after this call all retina outputs are updated
@ -163,7 +163,7 @@ public:
@param inputIsColorMultiplexed: set trus if the input data is a multiplexed color image (using Bayer sampling for example), the color sampling method must correspond to the RETINA_COLORSAMPLINGMETHOD passed at constructor!
* @return true if process ran well, false in case of failure
*/
const bool runFilter(const std::valarray<float> &imageInput, const bool useAdaptiveFiltering=true, const bool processRetinaParvoMagnoMapping=false, const bool useColorMode=false, const bool inputIsColorMultiplexed=false);
bool runFilter(const std::valarray<float> &imageInput, const bool useAdaptiveFiltering=true, const bool processRetinaParvoMagnoMapping=false, const bool useColorMode=false, const bool inputIsColorMultiplexed=false);
/**
* run the initilized retina filter in order to perform color tone mapping applied on an RGB image, after this call the color output of the retina is updated (use function getColorOutput() to grab it)
@ -329,14 +329,14 @@ public:
/**
* @return true if Parvocellular output is activated, false if not
*/
inline const bool areContoursProcessed(){return _useParvoOutput;};
inline bool areContoursProcessed(){return _useParvoOutput;};
/**
* method to retrieve the foveal parvocellular pathway response (no details energy in parafovea)
* @param parvoParafovealResponse: buffer that will be filled with the response of the magnocellular pathway in the parafoveal area
* @return true if process succeeded (if buffer exists, is its size matches retina size, if magno channel is activated and if mapping is initialized
*/
const bool getParvoFoveaResponse(std::valarray<float> &parvoFovealResponse);
bool getParvoFoveaResponse(std::valarray<float> &parvoFovealResponse);
/**
* @param useParvoOutput: true if Parvocellular output should be activated, false if not
@ -362,14 +362,14 @@ public:
/**
* @return true if Magnocellular output is activated, false if not
*/
inline const bool areMovingContoursProcessed(){return _useMagnoOutput;};
inline bool areMovingContoursProcessed(){return _useMagnoOutput;};
/**
* method to retrieve the parafoveal magnocellular pathway response (no motion energy in fovea)
* @param magnoParafovealResponse: buffer that will be filled with the response of the magnocellular pathway in the parafoveal area
* @return true if process succeeded (if buffer exists, is its size matches retina size, if magno channel is activated and if mapping is initialized
*/
const bool getMagnoParaFoveaResponse(std::valarray<float> &magnoParafovealResponse);
bool getMagnoParaFoveaResponse(std::valarray<float> &magnoParafovealResponse);
/**
* @param useMagnoOutput: true if Magnoocellular output should be activated, false if not
@ -425,20 +425,20 @@ public:
* @param result: the input buffer to fill with the transformed colorspace retina output
* @return true if process ended successfully
*/
inline const bool applyKrauskopfLMS2Acr1cr2Transform(std::valarray<float> &result){return _colorEngine.applyKrauskopfLMS2Acr1cr2Transform(result);};
inline bool applyKrauskopfLMS2Acr1cr2Transform(std::valarray<float> &result){return _colorEngine.applyKrauskopfLMS2Acr1cr2Transform(result);};
/**
* apply to the retina color output the Krauskopf transformation which leads to an opponent color system: output colorspace if Acr1cr2 if input of the retina was LMS color space
* @param result: the input buffer to fill with the transformed colorspace retina output
* @return true if process ended successfully
*/
inline const bool applyLMS2LabTransform(std::valarray<float> &result){return _colorEngine.applyLMS2LabTransform(result);};
inline bool applyLMS2LabTransform(std::valarray<float> &result){return _colorEngine.applyLMS2LabTransform(result);};
/**
* color processing dedicated functions
* @return the retina initialized mode, true if color mode (RGB), false if grayscale
*/
inline const bool isColorMode(){return _useColorMode;}; // return true if RGB mode, false if gray level mode
inline bool isColorMode(){return _useColorMode;}; // return true if RGB mode, false if gray level mode
/**
* @return the irregular low pass filter ouput at the photoreceptors level
@ -448,20 +448,20 @@ public:
/**
* @return true if color mode is activated, false if gray levels processing
*/
const bool getColorMode(){return _useColorMode;};
bool getColorMode(){return _useColorMode;};
/**
*
* @return true if a sufficient number of processed frames has been done since the last parameters update in order to get the stable state (r<EFBFBD>gime permanent)
*/
inline const bool isInitTransitionDone(){if (_ellapsedFramesSinceLastReset<_globalTemporalConstant)return false; return true;};
inline bool isInitTransitionDone(){if (_ellapsedFramesSinceLastReset<_globalTemporalConstant)return false; return true;};
/**
* find a distance in the image input space when the distance is known in the retina log sampled space...read again if it is not clear enough....sorry, i should sleep
* @param projectedRadiusLength: the distance to image center in the retina log sampled space
* @return the distance to image center in the input image space
*/
inline const float getRetinaSamplingBackProjection(const float projectedRadiusLength)
inline float getRetinaSamplingBackProjection(const float projectedRadiusLength)
{
if (_photoreceptorsLogSampling)
return (float)_photoreceptorsLogSampling->getOriginalRadiusLength(projectedRadiusLength);
@ -474,32 +474,32 @@ public:
/**
* @return number of rows of the filter
*/
inline const unsigned int getInputNBrows(){if (_photoreceptorsLogSampling) return _photoreceptorsLogSampling->getNBrows();else return _photoreceptorsPrefilter.getNBrows();};
inline unsigned int getInputNBrows(){if (_photoreceptorsLogSampling) return _photoreceptorsLogSampling->getNBrows();else return _photoreceptorsPrefilter.getNBrows();};
/**
* @return number of columns of the filter
*/
inline const unsigned int getInputNBcolumns(){if (_photoreceptorsLogSampling) return _photoreceptorsLogSampling->getNBcolumns();else return _photoreceptorsPrefilter.getNBcolumns();};
inline unsigned int getInputNBcolumns(){if (_photoreceptorsLogSampling) return _photoreceptorsLogSampling->getNBcolumns();else return _photoreceptorsPrefilter.getNBcolumns();};
/**
* @return number of pixels of the filter
*/
inline const unsigned int getInputNBpixels(){if (_photoreceptorsLogSampling) return _photoreceptorsLogSampling->getNBpixels();else return _photoreceptorsPrefilter.getNBpixels();};
inline unsigned int getInputNBpixels(){if (_photoreceptorsLogSampling) return _photoreceptorsLogSampling->getNBpixels();else return _photoreceptorsPrefilter.getNBpixels();};
/**
* @return the height of the frame output
*/
inline const unsigned int getOutputNBrows(){return _photoreceptorsPrefilter.getNBrows();};
inline unsigned int getOutputNBrows(){return _photoreceptorsPrefilter.getNBrows();};
/**
* @return the width of the frame output
*/
inline const unsigned int getOutputNBcolumns(){return _photoreceptorsPrefilter.getNBcolumns();};
inline unsigned int getOutputNBcolumns(){return _photoreceptorsPrefilter.getNBcolumns();};
/**
* @return the numbers of output pixels (width*height) of the images used by the object
*/
inline const unsigned int getOutputNBpixels(){return _photoreceptorsPrefilter.getNBpixels();};
inline unsigned int getOutputNBpixels(){return _photoreceptorsPrefilter.getNBpixels();};
private:

View File

@ -280,7 +280,7 @@ public:
/**
* @return standard deviation of the buffer
*/
const double getStandardDeviation()
double getStandardDeviation()
{
double standardDeviation=0;
double meanValue=getMean();
@ -372,7 +372,7 @@ public:
/**
* @return the mean value of the vector
*/
inline const double getMean(){return this->sum()/this->size();};
inline double getMean(){return this->sum()/this->size();};
protected:
size_t _NBrows;

View File

@ -1,3 +1,7 @@
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wsign-promo"
#endif
#ifndef _OPENCV_FLANN_PRECOMP_HPP_
#define _OPENCV_FLANN_PRECOMP_HPP_

View File

@ -380,7 +380,6 @@ int my_jpeg_load_dht (struct jpeg_decompress_struct *info, unsigned char *dht,
bool JpegDecoder::readData( Mat& img )
{
bool result = false;
uchar* data = img.data;
int step = (int)img.step;
bool color = img.channels() > 1;
JpegState* state = (JpegState*)m_state;
@ -439,6 +438,7 @@ bool JpegDecoder::readData( Mat& img )
buffer = (*cinfo->mem->alloc_sarray)((j_common_ptr)cinfo,
JPOOL_IMAGE, m_width*4, 1 );
uchar* data = img.data;
for( ; m_height--; data += step )
{
jpeg_read_scanlines( cinfo, buffer, 1 );
@ -533,19 +533,15 @@ ImageEncoder JpegEncoder::newEncoder() const
bool JpegEncoder::write( const Mat& img, const vector<int>& params )
{
int quality = 95;
for( size_t i = 0; i < params.size(); i += 2 )
struct fileWrapper
{
if( params[i] == CV_IMWRITE_JPEG_QUALITY )
{
quality = params[i+1];
quality = MIN(MAX(quality, 0), 100);
}
}
FILE* f;
fileWrapper() : f(0) {}
~fileWrapper() { if(f) fclose(f); }
};
bool result = false;
FILE* f = 0;
fileWrapper fw;
int _channels = img.channels();
int channels = _channels > 1 ? 3 : 1;
int width = img.cols, height = img.rows;
@ -564,10 +560,10 @@ bool JpegEncoder::write( const Mat& img, const vector<int>& params )
if( !m_buf )
{
f = fopen( m_filename.c_str(), "wb" );
if( !f )
fw.f = fopen( m_filename.c_str(), "wb" );
if( !fw.f )
goto _exit_;
jpeg_stdio_dest( &cinfo, f );
jpeg_stdio_dest( &cinfo, fw.f );
}
else
{
@ -587,6 +583,17 @@ bool JpegEncoder::write( const Mat& img, const vector<int>& params )
cinfo.input_components = channels;
cinfo.in_color_space = channels > 1 ? JCS_RGB : JCS_GRAYSCALE;
int quality = 95;
for( size_t i = 0; i < params.size(); i += 2 )
{
if( params[i] == CV_IMWRITE_JPEG_QUALITY )
{
quality = params[i+1];
quality = MIN(MAX(quality, 0), 100);
}
}
jpeg_set_defaults( &cinfo );
jpeg_set_quality( &cinfo, quality,
TRUE /* limit to baseline-JPEG values */ );
@ -619,7 +626,6 @@ bool JpegEncoder::write( const Mat& img, const vector<int>& params )
}
_exit_:
if(f) fclose(f);
jpeg_destroy_compress( &cinfo );
return result;

View File

@ -317,23 +317,6 @@ void PngEncoder::flushBuf(void*)
bool PngEncoder::write( const Mat& img, const vector<int>& params )
{
int compression_level = 0;
int compression_strategy = Z_RLE;
for( size_t i = 0; i < params.size(); i += 2 )
{
if( params[i] == CV_IMWRITE_PNG_COMPRESSION )
{
compression_level = params[i+1];
compression_level = MIN(MAX(compression_level, 0), MAX_MEM_LEVEL);
}
if( params[i] == CV_IMWRITE_PNG_STRATEGY )
{
compression_strategy = params[i+1];
compression_strategy = MIN(MAX(compression_strategy, 0), Z_FIXED);
}
}
png_structp png_ptr = png_create_write_struct( PNG_LIBPNG_VER_STRING, 0, 0, 0 );
png_infop info_ptr = 0;
FILE* f = 0;
@ -365,6 +348,23 @@ bool PngEncoder::write( const Mat& img, const vector<int>& params )
png_init_io( png_ptr, f );
}
int compression_level = 0;
int compression_strategy = Z_RLE;
for( size_t i = 0; i < params.size(); i += 2 )
{
if( params[i] == CV_IMWRITE_PNG_COMPRESSION )
{
compression_level = params[i+1];
compression_level = MIN(MAX(compression_level, 0), MAX_MEM_LEVEL);
}
if( params[i] == CV_IMWRITE_PNG_STRATEGY )
{
compression_strategy = params[i+1];
compression_strategy = MIN(MAX(compression_strategy, 0), Z_FIXED);
}
}
if( m_buf || f )
{
if( compression_level > 0 )

View File

@ -635,9 +635,9 @@ cvCreateTrackbar( const char*, const char*,
}
CV_IMPL int
cvCreateTrackbar2( const char* trackbar_name, const char* window_name,
int* val, int count, CvTrackbarCallback2 on_notify2,
void* userdata )
cvCreateTrackbar2( const char* /*trackbar_name*/, const char* /*window_name*/,
int* /*val*/, int /*count*/, CvTrackbarCallback2 /*on_notify2*/,
void* /*userdata*/ )
{
CV_NO_GUI_ERROR( "cvCreateTrackbar2" );
return -1;
@ -678,7 +678,7 @@ CV_IMPL int cvWaitKey( int )
return -1;
}
CV_IMPL int cvInitSystem( int argc, char** argv )
CV_IMPL int cvInitSystem( int , char** )
{
CV_NO_GUI_ERROR( "cvInitSystem" );
@ -693,23 +693,24 @@ CV_IMPL int cvStartWindowThread()
}
//-------- Qt ---------
CV_IMPL void cvAddText( const CvArr*, const char*, CvPoint org, CvFont* font)
CV_IMPL void cvAddText( const CvArr*, const char*, CvPoint , CvFont* )
{
CV_NO_GUI_ERROR("cvAddText");
}
CV_IMPL void cvDisplayStatusBar(const char* name, const char* arg2, int arg3)
CV_IMPL void cvDisplayStatusBar(const char* , const char* , int )
{
CV_NO_GUI_ERROR("cvDisplayStatusBar");
}
CV_IMPL void cvDisplayOverlay(const char* name, const char* text, int delayms)
CV_IMPL void cvDisplayOverlay(const char* , const char* , int )
{
CV_NO_GUI_ERROR("cvNamedWindow");
}
CV_IMPL int cvStartLoop(int (*pt2Func)(int argc, char *argv[]), int argc, char* argv[])
CV_IMPL int cvStartLoop(int (*)(int argc, char *argv[]), int , char* argv[])
{
(void)argv;
CV_NO_GUI_ERROR("cvStartLoop");
return -1;
}
@ -719,7 +720,7 @@ CV_IMPL void cvStopLoop()
CV_NO_GUI_ERROR("cvStopLoop");
}
CV_IMPL void cvSaveWindowParameters(const char* name)
CV_IMPL void cvSaveWindowParameters(const char* )
{
CV_NO_GUI_ERROR("cvSaveWindowParameters");
}

View File

@ -162,8 +162,6 @@ else()
endif()
add_dependencies(${the_module} ${api_target})
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations)
# Additional target properties
set_target_properties(${the_module} PROPERTIES
OUTPUT_NAME "${the_module}"

View File

@ -362,7 +362,7 @@ ManualFuncs = {
// C++: minMaxLoc(Mat src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
(JNIEnv* env, jclass cls, jlong src_nativeObj, jlong mask_nativeObj)
(JNIEnv* env, jclass, jlong src_nativeObj, jlong mask_nativeObj)
{
try {
LOGD("Core::n_1minMaxLoc()");
@ -432,7 +432,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
// C++: Size getTextSize(const string& text, int fontFace, double fontScale, int thickness, int* baseLine);
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
(JNIEnv* env, jclass cls, jstring text, jint fontFace, jdouble fontScale, jint thickness, jintArray baseLine)
(JNIEnv* env, jclass, jstring text, jint fontFace, jdouble fontScale, jint thickness, jintArray baseLine)
{
try {
LOGD("Core::n_1getTextSize()");
@ -1010,7 +1010,7 @@ extern "C" {
# java native method args
jn_args = []
# jni (cpp) function args
jni_args = [ArgInfo([ "env", "env", "", [], "" ]), ArgInfo([ "cls", "cls", "", [], "" ])]
jni_args = [ArgInfo([ "env", "env", "", [], "" ]), ArgInfo([ "cls", "", "", [], "" ])]
j_prologue = []
j_epilogue = []
c_prologue = []
@ -1375,7 +1375,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname
JNIEXPORT void JNICALL Java_org_opencv_%(module)s_%(j_cls)s_delete(JNIEnv*, jclass, jlong);
JNIEXPORT void JNICALL Java_org_opencv_%(module)s_%(j_cls)s_delete
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv*, jclass, jlong self)
{
delete (%(cls)s*) self;
}

View File

@ -24,7 +24,10 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__
(JNIEnv* env, jclass cls)
(JNIEnv*, jclass);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__
(JNIEnv*, jclass)
{
LOGD("Mat::n_1Mat__()");
return (jlong) new cv::Mat();
@ -36,9 +39,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__
// Mat::Mat(int rows, int cols, int type)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__III
(JNIEnv* env, jclass, jint rows, jint cols, jint type);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__III
(JNIEnv* env, jclass cls, jint rows, jint cols, jint type)
(JNIEnv* env, jclass, jint rows, jint cols, jint type)
{
try {
LOGD("Mat::n_1Mat__III()");
@ -66,9 +71,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__III
// Mat::Mat(Size size, int type)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDI
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDI
(JNIEnv* env, jclass cls, jdouble size_width, jdouble size_height, jint type)
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type)
{
try {
LOGD("Mat::n_1Mat__DDI()");
@ -96,9 +103,12 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDI
// Mat::Mat(int rows, int cols, int type, Scalar s)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIDDDD
(JNIEnv* env, jclass, jint rows, jint cols, jint type, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIDDDD
(JNIEnv* env, jclass cls, jint rows, jint cols, jint type, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3)
(JNIEnv* env, jclass, jint rows, jint cols, jint type, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3)
{
try {
LOGD("Mat::n_1Mat__IIIDDDD()");
@ -126,9 +136,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__IIIDDDD
// Mat::Mat(Size size, int type, Scalar s)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDIDDDD
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDIDDDD
(JNIEnv* env, jclass cls, jdouble size_width, jdouble size_height, jint type, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3)
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3)
{
try {
LOGD("Mat::n_1Mat__DDIDDDD()");
@ -157,9 +169,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__DDIDDDD
// Mat::Mat(Mat m, Range rowRange, Range colRange = Range::all())
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JIIII
(JNIEnv* env, jclass, jlong m_nativeObj, jint rowRange_start, jint rowRange_end, jint colRange_start, jint colRange_end);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JIIII
(JNIEnv* env, jclass cls, jlong m_nativeObj, jint rowRange_start, jint rowRange_end, jint colRange_start, jint colRange_end)
(JNIEnv* env, jclass, jlong m_nativeObj, jint rowRange_start, jint rowRange_end, jint colRange_start, jint colRange_end)
{
try {
LOGD("Mat::n_1Mat__JIIII()");
@ -183,10 +197,12 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JIIII
}
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JII
(JNIEnv* env, jclass, jlong m_nativeObj, jint rowRange_start, jint rowRange_end);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JII
(JNIEnv* env, jclass cls, jlong m_nativeObj, jint rowRange_start, jint rowRange_end)
(JNIEnv* env, jclass, jlong m_nativeObj, jint rowRange_start, jint rowRange_end)
{
try {
LOGD("Mat::n_1Mat__JII()");
@ -213,9 +229,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1Mat__JII
// Mat Mat::adjustROI(int dtop, int dbottom, int dleft, int dright)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1adjustROI
(JNIEnv* env, jclass, jlong self, jint dtop, jint dbottom, jint dleft, jint dright);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1adjustROI
(JNIEnv* env, jclass cls, jlong self, jint dtop, jint dbottom, jint dleft, jint dright)
(JNIEnv* env, jclass, jlong self, jint dtop, jint dbottom, jint dleft, jint dright)
{
try {
LOGD("Mat::n_1adjustROI()");
@ -243,9 +261,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1adjustROI
// void Mat::assignTo(Mat m, int type = -1)
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJI
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jint type);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJI
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj, jint type)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jint type)
{
try {
LOGD("Mat::n_1assignTo__JJI()");
@ -268,10 +288,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJI
}
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJ
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJ
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj)
{
try {
LOGD("Mat::n_1assignTo__JJ()");
@ -299,9 +320,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1assignTo__JJ
// int Mat::channels()
//
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1channels
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1channels
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1channels()");
@ -329,9 +352,11 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1channels
// int Mat::checkVector(int elemChannels, int depth = -1, bool requireContinuous = true)
//
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JIIZ
(JNIEnv* env, jclass, jlong self, jint elemChannels, jint depth, jboolean requireContinuous);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JIIZ
(JNIEnv* env, jclass cls, jlong self, jint elemChannels, jint depth, jboolean requireContinuous)
(JNIEnv* env, jclass, jlong self, jint elemChannels, jint depth, jboolean requireContinuous)
{
try {
LOGD("Mat::n_1checkVector__JIIZ()");
@ -355,9 +380,11 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JIIZ
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JII
(JNIEnv* env, jclass, jlong self, jint elemChannels, jint depth);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JII
(JNIEnv* env, jclass cls, jlong self, jint elemChannels, jint depth)
(JNIEnv* env, jclass, jlong self, jint elemChannels, jint depth)
{
try {
LOGD("Mat::n_1checkVector__JII()");
@ -380,10 +407,12 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JII
}
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JI
(JNIEnv* env, jclass, jlong self, jint elemChannels);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JI
(JNIEnv* env, jclass cls, jlong self, jint elemChannels)
(JNIEnv* env, jclass, jlong self, jint elemChannels)
{
try {
LOGD("Mat::n_1checkVector__JI()");
@ -411,9 +440,12 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1checkVector__JI
// Mat Mat::clone()
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1clone
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1clone
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1clone()");
@ -441,9 +473,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1clone
// Mat Mat::col(int x)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1col
(JNIEnv* env, jclass, jlong self, jint x);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1col
(JNIEnv* env, jclass cls, jlong self, jint x)
(JNIEnv* env, jclass, jlong self, jint x)
{
try {
LOGD("Mat::n_1col()");
@ -471,9 +505,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1col
// Mat Mat::colRange(int startcol, int endcol)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
(JNIEnv* env, jclass, jlong self, jint startcol, jint endcol);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
(JNIEnv* env, jclass cls, jlong self, jint startcol, jint endcol)
(JNIEnv* env, jclass, jlong self, jint startcol, jint endcol)
{
try {
LOGD("Mat::n_1colRange()");
@ -501,9 +537,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1colRange
// int Mat::cols()
//
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1cols
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1cols
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1cols()");
@ -531,9 +569,11 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1cols
// void Mat::convertTo(Mat& m, int rtype, double alpha = 1, double beta = 0)
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJIDD
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jint rtype, jdouble alpha, jdouble beta);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJIDD
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj, jint rtype, jdouble alpha, jdouble beta)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jint rtype, jdouble alpha, jdouble beta)
{
try {
LOGD("Mat::n_1convertTo__JJIDD()");
@ -557,10 +597,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJIDD
}
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJID
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jint rtype, jdouble alpha);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJID
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj, jint rtype, jdouble alpha)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jint rtype, jdouble alpha)
{
try {
LOGD("Mat::n_1convertTo__JJID()");
@ -584,10 +625,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJID
}
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJI
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jint rtype);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJI
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj, jint rtype)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jint rtype)
{
try {
LOGD("Mat::n_1convertTo__JJI()");
@ -616,9 +658,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1convertTo__JJI
// void Mat::copyTo(Mat& m)
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJ
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJ
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj)
{
try {
LOGD("Mat::n_1copyTo__JJ()");
@ -647,9 +691,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJ
// void Mat::copyTo(Mat& m, Mat mask)
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJJ
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jlong mask_nativeObj);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJJ
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj, jlong mask_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jlong mask_nativeObj)
{
try {
LOGD("Mat::n_1copyTo__JJJ()");
@ -679,9 +725,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1copyTo__JJJ
// void Mat::create(int rows, int cols, int type)
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JIII
(JNIEnv* env, jclass, jlong self, jint rows, jint cols, jint type);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JIII
(JNIEnv* env, jclass cls, jlong self, jint rows, jint cols, jint type)
(JNIEnv* env, jclass, jlong self, jint rows, jint cols, jint type)
{
try {
LOGD("Mat::n_1create__JIII()");
@ -709,9 +757,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JIII
// void Mat::create(Size size, int type)
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JDDI
(JNIEnv* env, jclass, jlong self, jdouble size_width, jdouble size_height, jint type);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JDDI
(JNIEnv* env, jclass cls, jlong self, jdouble size_width, jdouble size_height, jint type)
(JNIEnv* env, jclass, jlong self, jdouble size_width, jdouble size_height, jint type)
{
try {
LOGD("Mat::n_1create__JDDI()");
@ -740,9 +790,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1create__JDDI
// Mat Mat::cross(Mat m)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1cross
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1cross
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj)
{
try {
LOGD("Mat::n_1cross()");
@ -771,9 +823,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1cross
// long Mat::dataAddr()
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1dataAddr
(JNIEnv*, jclass, jlong self);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1dataAddr
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv*, jclass, jlong self)
{
LOGD("Mat::n_1dataAddr()");
Mat* me = (Mat*) self; //TODO: check for NULL
@ -786,9 +840,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1dataAddr
// int Mat::depth()
//
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1depth
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1depth
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1depth()");
@ -816,9 +872,11 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1depth
// Mat Mat::diag(int d = 0)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__JI
(JNIEnv* env, jclass, jlong self, jint d);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__JI
(JNIEnv* env, jclass cls, jlong self, jint d)
(JNIEnv* env, jclass, jlong self, jint d)
{
try {
LOGD("Mat::n_1diag__JI()");
@ -847,9 +905,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__JI
// static Mat Mat::diag(Mat d)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__J
(JNIEnv* env, jclass, jlong d_nativeObj);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__J
(JNIEnv* env, jclass cls, jlong d_nativeObj)
(JNIEnv* env, jclass, jlong d_nativeObj)
{
try {
LOGD("Mat::n_1diag__J()");
@ -877,9 +937,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1diag__J
// double Mat::dot(Mat m)
//
JNIEXPORT jdouble JNICALL Java_org_opencv_core_Mat_n_1dot
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj);
JNIEXPORT jdouble JNICALL Java_org_opencv_core_Mat_n_1dot
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj)
{
try {
LOGD("Mat::n_1dot()");
@ -908,9 +970,11 @@ JNIEXPORT jdouble JNICALL Java_org_opencv_core_Mat_n_1dot
// size_t Mat::elemSize()
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1elemSize()");
@ -938,9 +1002,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize
// size_t Mat::elemSize1()
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize1
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize1
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1elemSize1()");
@ -968,9 +1034,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1elemSize1
// bool Mat::empty()
//
JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1empty
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1empty
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1empty()");
@ -998,9 +1066,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1empty
// static Mat Mat::eye(int rows, int cols, int type)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__III
(JNIEnv* env, jclass, jint rows, jint cols, jint type);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__III
(JNIEnv* env, jclass cls, jint rows, jint cols, jint type)
(JNIEnv* env, jclass, jint rows, jint cols, jint type)
{
try {
LOGD("Mat::n_1eye__III()");
@ -1028,9 +1098,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__III
// static Mat Mat::eye(Size size, int type)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__DDI
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__DDI
(JNIEnv* env, jclass cls, jdouble size_width, jdouble size_height, jint type)
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type)
{
try {
LOGD("Mat::n_1eye__DDI()");
@ -1058,9 +1130,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1eye__DDI
// Mat Mat::inv(int method = DECOMP_LU)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__JI
(JNIEnv* env, jclass, jlong self, jint method);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__JI
(JNIEnv* env, jclass cls, jlong self, jint method)
(JNIEnv* env, jclass, jlong self, jint method)
{
try {
LOGD("Mat::n_1inv__JI()");
@ -1083,10 +1157,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__JI
}
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__J
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__J
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1inv__J()");
@ -1114,9 +1189,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1inv__J
// bool Mat::isContinuous()
//
JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isContinuous
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isContinuous
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1isContinuous()");
@ -1144,9 +1221,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isContinuous
// bool Mat::isSubmatrix()
//
JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isSubmatrix
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isSubmatrix
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1isSubmatrix()");
@ -1174,9 +1253,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_core_Mat_n_1isSubmatrix
// void Mat::locateROI(Size wholeSize, Point ofs)
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_locateROI_10
(JNIEnv* env, jclass, jlong self, jdoubleArray wholeSize_out, jdoubleArray ofs_out);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_locateROI_10
(JNIEnv* env, jclass cls, jlong self, jdoubleArray wholeSize_out, jdoubleArray ofs_out)
(JNIEnv* env, jclass, jlong self, jdoubleArray wholeSize_out, jdoubleArray ofs_out)
{
try {
LOGD("core::locateROI_10()");
@ -1206,9 +1287,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_locateROI_10
// Mat Mat::mul(Mat m, double scale = 1)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJD
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jdouble scale);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJD
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj, jdouble scale)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj, jdouble scale)
{
try {
LOGD("Mat::n_1mul__JJD()");
@ -1233,9 +1316,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJD
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJ
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJ
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj)
{
try {
LOGD("Mat::n_1mul__JJ()");
@ -1264,9 +1349,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1mul__JJ
// static Mat Mat::ones(int rows, int cols, int type)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__III
(JNIEnv* env, jclass, jint rows, jint cols, jint type);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__III
(JNIEnv* env, jclass cls, jint rows, jint cols, jint type)
(JNIEnv* env, jclass, jint rows, jint cols, jint type)
{
try {
LOGD("Mat::n_1ones__III()");
@ -1294,9 +1381,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__III
// static Mat Mat::ones(Size size, int type)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__DDI
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__DDI
(JNIEnv* env, jclass cls, jdouble size_width, jdouble size_height, jint type)
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type)
{
try {
LOGD("Mat::n_1ones__DDI()");
@ -1324,9 +1413,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1ones__DDI
// void Mat::push_back(Mat m)
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1push_1back
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1push_1back
(JNIEnv* env, jclass cls, jlong self, jlong m_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong m_nativeObj)
{
try {
LOGD("Mat::n_1push_1back()");
@ -1354,9 +1445,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1push_1back
// void Mat::release()
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1release
(JNIEnv* env, jclass, jlong self);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1release
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1release()");
@ -1384,9 +1477,11 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1release
// Mat Mat::reshape(int cn, int rows = 0)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JII
(JNIEnv* env, jclass, jlong self, jint cn, jint rows);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JII
(JNIEnv* env, jclass cls, jlong self, jint cn, jint rows)
(JNIEnv* env, jclass, jlong self, jint cn, jint rows)
{
try {
LOGD("Mat::n_1reshape__JII()");
@ -1410,9 +1505,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JII
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JI
(JNIEnv* env, jclass, jlong self, jint cn);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JI
(JNIEnv* env, jclass cls, jlong self, jint cn)
(JNIEnv* env, jclass, jlong self, jint cn)
{
try {
LOGD("Mat::n_1reshape__JI()");
@ -1440,9 +1537,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1reshape__JI
// Mat Mat::row(int y)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1row
(JNIEnv* env, jclass, jlong self, jint y);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1row
(JNIEnv* env, jclass cls, jlong self, jint y)
(JNIEnv* env, jclass, jlong self, jint y)
{
try {
LOGD("Mat::n_1row()");
@ -1470,9 +1569,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1row
// Mat Mat::rowRange(int startrow, int endrow)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1rowRange
(JNIEnv* env, jclass, jlong self, jint startrow, jint endrow);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1rowRange
(JNIEnv* env, jclass cls, jlong self, jint startrow, jint endrow)
(JNIEnv* env, jclass, jlong self, jint startrow, jint endrow)
{
try {
LOGD("Mat::n_1rowRange()");
@ -1500,9 +1601,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1rowRange
// int Mat::rows()
//
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1rows
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1rows
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1rows()");
@ -1530,9 +1633,11 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1rows
// Mat Mat::operator =(Scalar s)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDD
(JNIEnv* env, jclass, jlong self, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDD
(JNIEnv* env, jclass cls, jlong self, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3)
(JNIEnv* env, jclass, jlong self, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3)
{
try {
LOGD("Mat::n_1setTo__JDDDD()");
@ -1561,9 +1666,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDD
// Mat Mat::setTo(Scalar value, Mat mask = Mat())
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDDJ
(JNIEnv* env, jclass, jlong self, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3, jlong mask_nativeObj);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDDJ
(JNIEnv* env, jclass cls, jlong self, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3, jlong mask_nativeObj)
(JNIEnv* env, jclass, jlong self, jdouble s_val0, jdouble s_val1, jdouble s_val2, jdouble s_val3, jlong mask_nativeObj)
{
try {
LOGD("Mat::n_1setTo__JDDDDJ()");
@ -1593,9 +1700,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JDDDDJ
// Mat Mat::setTo(Mat value, Mat mask = Mat())
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJJ
(JNIEnv* env, jclass, jlong self, jlong value_nativeObj, jlong mask_nativeObj);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJJ
(JNIEnv* env, jclass cls, jlong self, jlong value_nativeObj, jlong mask_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong value_nativeObj, jlong mask_nativeObj)
{
try {
LOGD("Mat::n_1setTo__JJJ()");
@ -1621,9 +1730,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJJ
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJ
(JNIEnv* env, jclass, jlong self, jlong value_nativeObj);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJ
(JNIEnv* env, jclass cls, jlong self, jlong value_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong value_nativeObj)
{
try {
LOGD("Mat::n_1setTo__JJ()");
@ -1652,9 +1763,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1setTo__JJ
// Size Mat::size()
//
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_n_1size
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_n_1size
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1size()");
@ -1682,9 +1795,11 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_n_1size
// size_t Mat::step1(int i = 0)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__JI
(JNIEnv* env, jclass, jlong self, jint i);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__JI
(JNIEnv* env, jclass cls, jlong self, jint i)
(JNIEnv* env, jclass, jlong self, jint i)
{
try {
LOGD("Mat::n_1step1__JI()");
@ -1708,9 +1823,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__JI
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__J
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__J
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1step1__J()");
@ -1736,9 +1853,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1step1__J
// Mat Mat::operator()(Range rowRange, Range colRange)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat_1rr
(JNIEnv* env, jclass, jlong self, jint rowRange_start, jint rowRange_end, jint colRange_start, jint colRange_end);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat_1rr
(JNIEnv* env, jclass cls, jlong self, jint rowRange_start, jint rowRange_end, jint colRange_start, jint colRange_end)
(JNIEnv* env, jclass, jlong self, jint rowRange_start, jint rowRange_end, jint colRange_start, jint colRange_end)
{
try {
LOGD("Mat::n_1submat_1rr()");
@ -1768,9 +1887,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat_1rr
// Mat Mat::operator()(Rect roi)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat
(JNIEnv* env, jclass, jlong self, jint roi_x, jint roi_y, jint roi_width, jint roi_height);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat
(JNIEnv* env, jclass cls, jlong self, jint roi_x, jint roi_y, jint roi_width, jint roi_height)
(JNIEnv* env, jclass, jlong self, jint roi_x, jint roi_y, jint roi_width, jint roi_height)
{
try {
LOGD("Mat::n_1submat()");
@ -1799,9 +1920,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1submat
// Mat Mat::t()
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1t
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1t
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1t()");
@ -1829,9 +1952,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1t
// size_t Mat::total()
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1total
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1total
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1total()");
@ -1859,9 +1984,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1total
// int Mat::type()
//
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1type
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1type
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
LOGD("Mat::n_1type()");
@ -1889,9 +2016,11 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1type
// static Mat Mat::zeros(int rows, int cols, int type)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__III
(JNIEnv* env, jclass, jint rows, jint cols, jint type);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__III
(JNIEnv* env, jclass cls, jint rows, jint cols, jint type)
(JNIEnv* env, jclass, jint rows, jint cols, jint type)
{
try {
LOGD("Mat::n_1zeros__III()");
@ -1919,9 +2048,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__III
// static Mat Mat::zeros(Size size, int type)
//
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__DDI
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type);
JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__DDI
(JNIEnv* env, jclass cls, jdouble size_width, jdouble size_height, jint type)
(JNIEnv* env, jclass, jdouble size_width, jdouble size_height, jint type)
{
try {
LOGD("Mat::n_1zeros__DDI()");
@ -1951,7 +2082,10 @@ JNIEXPORT jlong JNICALL Java_org_opencv_core_Mat_n_1zeros__DDI
//
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1delete
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv*, jclass, jlong self);
JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1delete
(JNIEnv*, jclass, jlong self)
{
delete (Mat*) self;
}
@ -1960,7 +2094,10 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_n_1delete
#define PUT_ITEM(T, R, C) { T*dst = (T*)me->ptr(R, C); for(int ch=0; ch<me->channels() && count>0; count--,ch++,src++,dst++) *dst = cv::saturate_cast<T>(*src); }
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutD
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jdoubleArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jdoubleArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutD
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jdoubleArray vals)
{
try {
LOGD("Mat::nPutD()");
@ -2054,7 +2191,10 @@ template<typename T> static int mat_put(cv::Mat* m, int row, int col, int count,
extern "C" {
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jbyteArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jbyteArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jbyteArray vals)
{
try {
LOGD("Mat::nPutB()");
@ -2082,7 +2222,10 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutB
}
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jshortArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jshortArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jshortArray vals)
{
try {
LOGD("Mat::nPutS()");
@ -2110,7 +2253,10 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutS
}
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jintArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jintArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jintArray vals)
{
try {
LOGD("Mat::nPutI()");
@ -2138,7 +2284,10 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutI
}
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutF
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jfloatArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jfloatArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nPutF
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jfloatArray vals)
{
try {
LOGD("Mat::nPutF()");
@ -2201,7 +2350,10 @@ template<typename T> int mat_get(cv::Mat* m, int row, int col, int count, char*
extern "C" {
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jbyteArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jbyteArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jbyteArray vals)
{
try {
LOGD("Mat::nGetB()");
@ -2229,7 +2381,10 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetB
}
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jshortArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jshortArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jshortArray vals)
{
try {
LOGD("Mat::nGetS()");
@ -2257,7 +2412,10 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetS
}
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jintArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jintArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jintArray vals)
{
try {
LOGD("Mat::nGetI()");
@ -2285,7 +2443,10 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetI
}
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jfloatArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jfloatArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jfloatArray vals)
{
try {
LOGD("Mat::nGetF()");
@ -2313,7 +2474,10 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetF
}
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count, jdoubleArray vals)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jdoubleArray vals);
JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count, jdoubleArray vals)
{
try {
LOGD("Mat::nGetD()");
@ -2341,7 +2505,10 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_nGetD
}
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet
(JNIEnv* env, jclass cls, jlong self, jint row, jint col, jint count)
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count);
JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet
(JNIEnv* env, jclass, jlong self, jint row, jint col, jint count)
{
try {
LOGD("Mat::nGet()");
@ -2380,7 +2547,10 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_nGet
}
JNIEXPORT jstring JNICALL Java_org_opencv_core_Mat_nDump
(JNIEnv *env, jclass cls, jlong self)
(JNIEnv *env, jclass, jlong self);
JNIEXPORT jstring JNICALL Java_org_opencv_core_Mat_nDump
(JNIEnv *env, jclass, jlong self)
{
cv::Mat* me = (cv::Mat*) self; //TODO: check for NULL
std::stringstream s;

View File

@ -20,9 +20,11 @@ extern "C" {
// VideoCapture::VideoCapture()
//
JNIEXPORT jlong JNICALL Java_org_opencv_highgui_VideoCapture_n_1VideoCapture__
(JNIEnv* env, jclass);
JNIEXPORT jlong JNICALL Java_org_opencv_highgui_VideoCapture_n_1VideoCapture__
(JNIEnv* env, jclass cls)
(JNIEnv* env, jclass)
{
try {
#ifdef DEBUG
@ -55,9 +57,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_highgui_VideoCapture_n_1VideoCapture__
// VideoCapture::VideoCapture(int device)
//
JNIEXPORT jlong JNICALL Java_org_opencv_highgui_VideoCapture_n_1VideoCapture__I
(JNIEnv* env, jclass, jint device);
JNIEXPORT jlong JNICALL Java_org_opencv_highgui_VideoCapture_n_1VideoCapture__I
(JNIEnv* env, jclass cls, jint device)
(JNIEnv* env, jclass, jint device)
{
try {
#ifdef DEBUG
@ -91,9 +95,11 @@ JNIEXPORT jlong JNICALL Java_org_opencv_highgui_VideoCapture_n_1VideoCapture__I
// double VideoCapture::get(int propId)
//
JNIEXPORT jdouble JNICALL Java_org_opencv_highgui_VideoCapture_n_1get
(JNIEnv* env, jclass, jlong self, jint propId);
JNIEXPORT jdouble JNICALL Java_org_opencv_highgui_VideoCapture_n_1get
(JNIEnv* env, jclass cls, jlong self, jint propId)
(JNIEnv* env, jclass, jlong self, jint propId)
{
try {
#ifdef DEBUG
@ -127,9 +133,11 @@ JNIEXPORT jdouble JNICALL Java_org_opencv_highgui_VideoCapture_n_1get
// bool VideoCapture::grab()
//
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1grab
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1grab
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
#ifdef DEBUG
@ -163,9 +171,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1grab
// bool VideoCapture::isOpened()
//
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1isOpened
(JNIEnv* env, jclass, jlong self);
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1isOpened
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
#ifdef DEBUG
@ -198,9 +208,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1isOpened
// bool VideoCapture::open(int device)
//
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1open__JI
(JNIEnv* env, jclass, jlong self, jint device);
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1open__JI
(JNIEnv* env, jclass cls, jlong self, jint device)
(JNIEnv* env, jclass, jlong self, jint device)
{
try {
#ifdef DEBUG
@ -234,9 +246,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1open__JI
// bool VideoCapture::read(Mat image)
//
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1read
(JNIEnv* env, jclass, jlong self, jlong image_nativeObj);
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1read
(JNIEnv* env, jclass cls, jlong self, jlong image_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong image_nativeObj)
{
try {
#ifdef DEBUG
@ -271,9 +285,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1read
// void VideoCapture::release()
//
JNIEXPORT void JNICALL Java_org_opencv_highgui_VideoCapture_n_1release
(JNIEnv* env, jclass, jlong self);
JNIEXPORT void JNICALL Java_org_opencv_highgui_VideoCapture_n_1release
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv* env, jclass, jlong self)
{
try {
#ifdef DEBUG
@ -307,9 +323,11 @@ JNIEXPORT void JNICALL Java_org_opencv_highgui_VideoCapture_n_1release
// bool VideoCapture::retrieve(Mat image, int channel = 0)
//
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1retrieve__JJI
(JNIEnv* env, jclass, jlong self, jlong image_nativeObj, jint channel);
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1retrieve__JJI
(JNIEnv* env, jclass cls, jlong self, jlong image_nativeObj, jint channel)
(JNIEnv* env, jclass, jlong self, jlong image_nativeObj, jint channel)
{
try {
#ifdef DEBUG
@ -340,9 +358,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1retrieve__JJI
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1retrieve__JJ
(JNIEnv* env, jclass, jlong self, jlong image_nativeObj);
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1retrieve__JJ
(JNIEnv* env, jclass cls, jlong self, jlong image_nativeObj)
(JNIEnv* env, jclass, jlong self, jlong image_nativeObj)
{
try {
#ifdef DEBUG
@ -377,9 +397,11 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1retrieve__JJ
// bool VideoCapture::set(int propId, double value)
//
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1set
(JNIEnv* env, jclass, jlong self, jint propId, jdouble value);
JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1set
(JNIEnv* env, jclass cls, jlong self, jint propId, jdouble value)
(JNIEnv* env, jclass, jlong self, jint propId, jdouble value)
{
try {
#ifdef DEBUG
@ -408,7 +430,10 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_highgui_VideoCapture_n_1set
}
JNIEXPORT jstring JNICALL Java_org_opencv_highgui_VideoCapture_n_1getSupportedPreviewSizes
(JNIEnv *env, jclass cls, jlong self)
(JNIEnv *env, jclass, jlong self);
JNIEXPORT jstring JNICALL Java_org_opencv_highgui_VideoCapture_n_1getSupportedPreviewSizes
(JNIEnv *env, jclass, jlong self)
{
try {
#ifdef DEBUG
@ -444,7 +469,10 @@ JNIEXPORT jstring JNICALL Java_org_opencv_highgui_VideoCapture_n_1getSupportedPr
//
JNIEXPORT void JNICALL Java_org_opencv_highgui_VideoCapture_n_1delete
(JNIEnv* env, jclass cls, jlong self)
(JNIEnv*, jclass, jlong self);
JNIEXPORT void JNICALL Java_org_opencv_highgui_VideoCapture_n_1delete
(JNIEnv*, jclass, jlong self)
{
delete (VideoCapture*) self;
}

View File

@ -21,7 +21,7 @@
extern "C" {
JNIEXPORT jint JNICALL
JNI_OnLoad(JavaVM* vm, void* reserved)
JNI_OnLoad(JavaVM* vm, void* )
{
JNIEnv* env;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK)
@ -51,7 +51,7 @@ JNI_OnLoad(JavaVM* vm, void* reserved)
}
JNIEXPORT void JNICALL
JNI_OnUnload(JavaVM *vm, void *reserved)
JNI_OnUnload(JavaVM*, void*)
{
//do nothing
}

View File

@ -25,7 +25,10 @@ extern "C" {
*/
JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat
(JNIEnv * env, jclass cls, jobject bitmap, jlong m_addr)
(JNIEnv * env, jclass, jobject bitmap, jlong m_addr);
JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat
(JNIEnv * env, jclass, jobject bitmap, jlong m_addr)
{
AndroidBitmapInfo info;
void* pixels = 0;
@ -73,7 +76,10 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat
* Method: void nMatToBitmap(long m_addr, Bitmap b)
*/
JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap
(JNIEnv * env, jclass cls, jlong m_addr, jobject bitmap)
(JNIEnv * env, jclass, jlong m_addr, jobject bitmap);
JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap
(JNIEnv * env, jclass, jlong m_addr, jobject bitmap)
{
AndroidBitmapInfo info;
void* pixels = 0;

View File

@ -75,7 +75,7 @@ public:
};
inline void AddPoint(float x, float y, float r)
{
DefTrackPoint p = {x,y,r,0};
DefTrackPoint p = {x,y,r,0,0,0};
int Num = GetPointNum();
if(Num > 0)

View File

@ -273,6 +273,9 @@ inline void sum_50t_176c(uchar **pp, uchar *sig, unsigned short *temp)
ssig[9] =_mm_packus_epi16(_mm_srai_epi16(ttemp[18],2),_mm_srai_epi16(ttemp[19],2));
ssig[10] =_mm_packus_epi16(_mm_srai_epi16(ttemp[20],2),_mm_srai_epi16(ttemp[21],2));
#else
(void)pp;
(void)sig;
(void)temp;
CV_Error( CV_StsNotImplemented, "Not supported without SSE2" );
#endif
}

View File

@ -3079,7 +3079,7 @@ static int _cvFindOppositSiteCW(pCvVoronoiHole pHole, CvVoronoiDiagramInt* pVoro
pCvVoronoiEdge pEdge_right = &Edge_right;
CvVoronoiEdgeInt Edge = {NULL,pNode,pSite_right,NULL,NULL,NULL,NULL,NULL};
CvVoronoiEdgeInt Edge_cur = {NULL,NULL,NULL,NULL,NULL,NULL,NULL};
CvVoronoiEdgeInt Edge_cur = {NULL,NULL, NULL, NULL,NULL,NULL,NULL,NULL};
pCvVoronoiEdge pEdge = &Edge;
float radius1, radius2,dist1, dist2;
@ -3133,8 +3133,8 @@ static int _cvFindOppositSiteCCW(pCvVoronoiHole pHole,CvVoronoiDiagramInt* pVoro
pCvVoronoiEdge pEdge_left = &Edge_left;
pCvVoronoiEdge pEdge_right = pSite_right->edge1->prev_edge;
CvVoronoiEdgeInt Edge = {NULL,pNode,pSite_left,NULL,NULL,NULL,NULL};
CvVoronoiEdgeInt Edge_cur = {NULL,NULL,NULL,NULL,NULL,NULL,NULL};
CvVoronoiEdgeInt Edge = {NULL,pNode,pSite_left,NULL,NULL,NULL,NULL,NULL};
CvVoronoiEdgeInt Edge_cur = {NULL,NULL, NULL, NULL,NULL,NULL,NULL,NULL};
pCvVoronoiEdge pEdge = &Edge;
double dist1, dist2;

View File

@ -105,9 +105,11 @@ void generateData( Mat& data, Mat& labels, const vector<int>& sizes, const Mat&
else if( labelType == CV_32SC1 )
labels.at<int>(p, 0) = l;
else
{
CV_DbgAssert(0);
}
}
}
}
static

View File

@ -105,9 +105,11 @@ void generateData( Mat& data, Mat& labels, const vector<int>& sizes, const Mat&
else if( labelType == CV_32SC1 )
labels.at<int>(p, 0) = l;
else
{
CV_DbgAssert(0);
}
}
}
}
static

View File

@ -486,6 +486,7 @@ endo: ; // end search for this o
}
return rc;
#else
(void)im;
deque <CvDataMatrixCode> rc;
return rc;
#endif

View File

@ -1,5 +1,9 @@
#include "perf_precomp.hpp"
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wsign-promo"
#endif
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/internal.hpp"
#include "opencv2/flann/flann.hpp"

View File

@ -192,6 +192,7 @@ MultiBandBlender::MultiBandBlender(int try_gpu, int num_bands, int weight_type)
#ifdef HAVE_OPENCV_GPU
can_use_gpu_ = try_gpu && gpu::getCudaEnabledDeviceCount();
#else
(void)try_gpu;
can_use_gpu_ = false;
#endif
CV_Assert(weight_type == CV_32F || weight_type == CV_16S);
@ -507,6 +508,10 @@ void createLaplacePyrGpu(const Mat &img, int num_levels, vector<Mat> &pyr)
}
gpu_pyr[num_levels].download(pyr[num_levels]);
#else
(void)img;
(void)num_levels;
(void)pyr;
#endif
}
@ -542,6 +547,8 @@ void restoreImageFromLaplacePyrGpu(vector<Mat> &pyr)
}
gpu_pyr[0].download(pyr[0]);
#else
(void)pyr;
#endif
}

View File

@ -534,6 +534,8 @@ BestOf2NearestMatcher::BestOf2NearestMatcher(bool try_use_gpu, float match_conf,
if (try_use_gpu && getCudaEnabledDeviceCount() > 0)
impl_ = new GpuMatcher(match_conf);
else
#else
(void)try_use_gpu;
#endif
impl_ = new CpuMatcher(match_conf);

View File

@ -1129,26 +1129,26 @@ norm_(const _Tp* src, size_t total, int cn, int normType, double startval, const
{
if( !mask )
for( i = 0; i < total; i++ )
result = std::max(result, (double)std::abs(src[i]));
result = std::max(result, (double)std::abs(int(src[i])));
else
for( int c = 0; c < cn; c++ )
{
for( i = 0; i < total; i++ )
if( mask[i] )
result = std::max(result, (double)std::abs(src[i*cn + c]));
result = std::max(result, (double)std::abs(int(src[i*cn + c])));
}
}
else if( normType == NORM_L1 )
{
if( !mask )
for( i = 0; i < total; i++ )
result += std::abs(src[i]);
result += std::abs(int(src[i]));
else
for( int c = 0; c < cn; c++ )
{
for( i = 0; i < total; i++ )
if( mask[i] )
result += std::abs(src[i*cn + c]);
result += std::abs(int(src[i*cn + c]));
}
}
else

View File

@ -19,7 +19,7 @@ inline void vector_Rect_to_Mat(vector<Rect>& v_rect, Mat& mat)
}
JNIEXPORT jlong JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeCreateObject
(JNIEnv * jenv, jclass jobj, jstring jFileName, jint faceSize)
(JNIEnv * jenv, jclass, jstring jFileName, jint faceSize)
{
const char* jnamestr = jenv->GetStringUTFChars(jFileName, NULL);
string stdFileName(jnamestr);
@ -52,7 +52,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeC
}
JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDestroyObject
(JNIEnv * jenv, jclass jobj, jlong thiz)
(JNIEnv * jenv, jclass, jlong thiz)
{
try
{
@ -76,7 +76,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDe
}
JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStart
(JNIEnv * jenv, jclass jobj, jlong thiz)
(JNIEnv * jenv, jclass, jlong thiz)
{
try
{
@ -99,7 +99,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt
}
JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStop
(JNIEnv * jenv, jclass jobj, jlong thiz)
(JNIEnv * jenv, jclass, jlong thiz)
{
try
{
@ -122,7 +122,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSt
}
JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSetFaceSize
(JNIEnv * jenv, jclass jobj, jlong thiz, jint faceSize)
(JNIEnv * jenv, jclass, jlong thiz, jint faceSize)
{
try
{
@ -153,7 +153,7 @@ JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSe
JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeDetect
(JNIEnv * jenv, jclass jobj, jlong thiz, jlong imageGray, jlong faces)
(JNIEnv * jenv, jclass, jlong thiz, jlong imageGray, jlong faces)
{
try
{

View File

@ -6,6 +6,7 @@ const char* message = "Hello Android!";
int main(int argc, char* argv[])
{
(void)argc; (void)argv;
// print message to console
printf("%s\n", message);

View File

@ -8,7 +8,7 @@ using namespace std;
using namespace cv;
extern "C" {
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial3_Sample3View_FindFeatures(JNIEnv* env, jobject thiz, jint width, jint height, jbyteArray yuv, jintArray bgra)
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial3_Sample3View_FindFeatures(JNIEnv* env, jobject, jint width, jint height, jbyteArray yuv, jintArray bgra)
{
jbyte* _yuv = env->GetByteArrayElements(yuv, 0);
jint* _bgra = env->GetIntArrayElements(bgra, 0);

View File

@ -8,7 +8,7 @@ using namespace std;
using namespace cv;
extern "C" {
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial4_Sample4View_FindFeatures(JNIEnv* env, jobject thiz, jlong addrGray, jlong addrRgba)
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial4_Sample4View_FindFeatures(JNIEnv*, jobject, jlong addrGray, jlong addrRgba)
{
Mat* pMatGr=(Mat*)addrGray;
Mat* pMatRgb=(Mat*)addrRgba;

View File

@ -368,7 +368,7 @@ static void print_params(CvVSModule* pM, const char* module, const char* log_nam
int main(int argc, char* argv[])
{ /* Main function: */
CvCapture* pCap = NULL;
CvBlobTrackerAutoParam1 param = {0};
CvBlobTrackerAutoParam1 param = {0,0,0,0,0,0,0,0};
CvBlobTrackerAuto* pTracker = NULL;
//float scale = 1;

View File

@ -19,6 +19,7 @@ CvSeq* contours = 0;
static void on_trackbar(int pos)
{
(void)pos;
IplImage* cnt_img = cvCreateImage( cvSize(w,w), 8, 3 );
CvSeq* _contours = contours;
int _levels = levels - 3;
@ -52,6 +53,7 @@ static void findCComp( IplImage* img )
int main(int argc, char* argv[])
{
(void)argc; (void)argv;
int i, j;
CvMemStorage* storage = cvCreateMemStorage(0);
IplImage* img = cvCreateImage( cvSize(w,w), 8, 1 );

View File

@ -231,9 +231,7 @@ static void run(void)
int main( int argc, char** argv )
{
#ifdef _MSC_VER
argc, argv;
#endif
(void)argc; (void)argv;
help();
run();
return 0;

View File

@ -16,6 +16,7 @@ static void help(void)
static void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step,
double scale, CvScalar color)
{
(void)scale;
int x, y;
for( y = 0; y < cflowmap->rows; y += step)
for( x = 0; x < cflowmap->cols; x += step)
@ -29,6 +30,7 @@ static void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step,
int main( int argc, char** argv )
{
(void)argc; (void)argv;
CvCapture* capture = cvCreateCameraCapture(0);
CvMat* prevgray = 0, *gray = 0, *flow = 0, *cflow = 0;

View File

@ -17,6 +17,7 @@ int erode_dilate_pos = 0;
// callback function for open/close trackbar
static void OpenClose(int pos)
{
(void)pos;
int n = open_close_pos - max_iters;
int an = n > 0 ? n : -n;
element = cvCreateStructuringElementEx( an*2+1, an*2+1, an, an, element_shape, 0 );
@ -37,6 +38,7 @@ static void OpenClose(int pos)
// callback function for erode/dilate trackbar
static void ErodeDilate(int pos)
{
(void)pos;
int n = erode_dilate_pos - max_iters;
int an = n > 0 ? n : -n;
element = cvCreateStructuringElementEx( an*2+1, an*2+1, an, an, element_shape, 0 );

View File

@ -34,6 +34,7 @@ CvPoint pt1, pt2;
static void ON_SEGMENT(int a)
{
(void)a;
cvPyrSegmentation(image0, image1, storage, &comp,
level, threshold1+1, threshold2+1);

View File

@ -66,7 +66,7 @@ int main(int argc, char* argv[])
if (status != Stitcher::OK)
{
cout << "Can't stitch images, error code = " << status << endl;
cout << "Can't stitch images, error code = " << int(status) << endl;
return -1;
}