Skip to content

Commit

Permalink
Add update on Algorithm, add cv::read and cv::write instantiations
Browse files Browse the repository at this point in the history
  • Loading branch information
HGuillemet committed Jan 9, 2024
1 parent 77e27ac commit 7591bbf
Show file tree
Hide file tree
Showing 211 changed files with 929 additions and 286 deletions.
126 changes: 120 additions & 6 deletions opencv/src/gen/java/org/bytedeco/opencv/global/opencv_core.java
Original file line number Diff line number Diff line change
Expand Up @@ -6849,10 +6849,11 @@ CV_CALL macro calls CV (or IPL) function, checks error status and
@Namespace("cv") public static native void insertImageCOI(@ByVal UMat coiimg, CvArr arr);
@Namespace("cv") public static native void insertImageCOI(@ByVal GpuMat coiimg, CvArr arr, int coi/*=-1*/);
@Namespace("cv") public static native void insertImageCOI(@ByVal GpuMat coiimg, CvArr arr);
// Targeting ../opencv_core/CvMatDefaultDeleter.java



////// specialized implementations of DefaultDeleter::operator() for classic OpenCV types //////

////////////// convenient wrappers for operating old-style dynamic structures //////////////

/**
Expand Down Expand Up @@ -12192,6 +12193,18 @@ storage is built in memory as a hierarchy of file nodes (see FileNode)
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef KeyPoint value, @Const @ByRef KeyPoint default_value);
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef DMatch value, @Const @ByRef DMatch default_value);

@Namespace("cv") public static native @Name("read<int>") void read(@Const @ByRef FileNode node, @ByRef Point value, @Const @ByRef Point default_value);

@Namespace("cv") public static native @Name("read<int>") void read(@Const @ByRef FileNode node, @ByRef Point3i value, @Const @ByRef Point3i default_value);

@Namespace("cv") public static native @Name("read<int>") void read(@Const @ByRef FileNode node, @ByRef Size value, @Const @ByRef Size default_value);



@Namespace("cv") public static native @Name("read<int>") void read(@Const @ByRef FileNode node, @ByRef Rect value, @Const @ByRef Rect default_value);

@Namespace("cv") public static native @Name("read<int>") void read(@Const @ByRef FileNode node, @ByRef Scalar4i value, @Const @ByRef Scalar4i default_value);

@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @ByRef Range value, @Const @ByRef Range default_value);

/** \}
Expand All @@ -12212,14 +12225,48 @@ storage is built in memory as a hierarchy of file nodes (see FileNode)
* \relates cv::FileStorage
* \{ */

@Namespace("cv") public static native void write( @ByRef FileStorage fs, int value );
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Point value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Point2f value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Point2d value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Point3i value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Point3f value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Point3d value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Size value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Size2f value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Size2d value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Complexf value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Complexd value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Rect value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Rect2f value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Rect2d value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Scalar4i value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Scalar4f value);

@Namespace("cv") public static native void write( @ByRef FileStorage fs, float value );
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Scalar value);

@Namespace("cv") public static native void write( @ByRef FileStorage fs, double value );
@Namespace("cv") public static native void write(@ByRef FileStorage fs, int value);

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer value );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String value );
@Namespace("cv") public static native void write(@ByRef FileStorage fs, float value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, double value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Str BytePointer value);
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Str String value);

@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Const @ByRef Range r );

Expand All @@ -12232,6 +12279,57 @@ storage is built in memory as a hierarchy of file nodes (see FileNode)
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef DMatch m);
@Namespace("cv") public static native void write(@ByRef FileStorage fs, @Str String name, @Const @ByRef DMatch m);

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Point val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Point val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Point2f val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Point2f val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Point2d val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Point2d val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Point3i val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Point3i val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Point3f val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Point3f val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Point3d val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Point3d val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Size val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Size val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Size2f val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Size2f val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Size2d val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Size2d val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Complexf val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Complexf val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Complexd val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Complexd val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Rect val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Rect val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Rect2f val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Rect2f val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Rect2d val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Rect2d val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Scalar4i val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Scalar4i val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Scalar4f val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Scalar4f val );

@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str BytePointer name, @Const @ByRef Scalar val );
@Namespace("cv") public static native void write( @ByRef FileStorage fs, @Str String name, @Const @ByRef Scalar val );

// #ifdef CV__LEGACY_PERSISTENCE
// This code is not needed anymore, but it is preserved here to keep source compatibility
// Implementation is similar to templates instantiations
Expand All @@ -12257,6 +12355,22 @@ storage is built in memory as a hierarchy of file nodes (see FileNode)
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @Cast("ushort*") @ByRef ShortBuffer value, @Cast("ushort") short default_value);
@Namespace("cv") public static native void read(@Const @ByRef FileNode node, @Cast("ushort*") @ByRef short[] value, @Cast("ushort") short default_value);

@Namespace("cv") public static native @Name("read<int>") void read( @ByRef FileNodeIterator it, @StdVector IntPointer vec, @Cast("size_t") long maxCount/*=(size_t)INT_MAX*/ );
@Namespace("cv") public static native @Name("read<int>") void read( @ByRef FileNodeIterator it, @StdVector IntPointer vec );
@Namespace("cv") public static native @Name("read<int>") void read( @ByRef FileNodeIterator it, @StdVector IntBuffer vec, @Cast("size_t") long maxCount/*=(size_t)INT_MAX*/ );
@Namespace("cv") public static native @Name("read<int>") void read( @ByRef FileNodeIterator it, @StdVector IntBuffer vec );
@Namespace("cv") public static native @Name("read<int>") void read( @ByRef FileNodeIterator it, @StdVector int[] vec, @Cast("size_t") long maxCount/*=(size_t)INT_MAX*/ );
@Namespace("cv") public static native @Name("read<int>") void read( @ByRef FileNodeIterator it, @StdVector int[] vec );



@Namespace("cv") public static native @Name("read<int>") void read( @Const @ByRef FileNode node, @StdVector IntPointer vec, @StdVector IntPointer default_value/*=std::vector<int>()*/ );
@Namespace("cv") public static native @Name("read<int>") void read( @Const @ByRef FileNode node, @StdVector IntPointer vec );
@Namespace("cv") public static native @Name("read<int>") void read( @Const @ByRef FileNode node, @StdVector IntBuffer vec, @StdVector IntBuffer default_value/*=std::vector<int>()*/ );
@Namespace("cv") public static native @Name("read<int>") void read( @Const @ByRef FileNode node, @StdVector IntBuffer vec );
@Namespace("cv") public static native @Name("read<int>") void read( @Const @ByRef FileNode node, @StdVector int[] vec, @StdVector int[] default_value/*=std::vector<int>()*/ );
@Namespace("cv") public static native @Name("read<int>") void read( @Const @ByRef FileNode node, @StdVector int[] vec );

@Namespace("cv") public static native void read( @Const @ByRef FileNode node, @ByRef KeyPointVector vec, @Const @ByRef KeyPointVector default_value );

@Namespace("cv") public static native void read( @Const @ByRef FileNode node, @ByRef DMatchVector vec, @Const @ByRef DMatchVector default_value );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class opencv_cudacodec extends org.bytedeco.opencv.presets.opencv_cudacod
\{
\defgroup cudacodec Video Encoding/Decoding
\}
*/ // Stream
*/

/** \addtogroup cudacodec
* \{
Expand Down Expand Up @@ -229,9 +229,9 @@ public class opencv_cudacodec extends org.bytedeco.opencv.presets.opencv_cudacod

/** \brief Creates video writer.
<p>
@param fileName Name of the output video file. Only raw h264 or hevc files are supported.
@param fileName Name of the output video file.
@param frameSize Size of the input video frames.
@param codec Codec.
@param codec Supports Codec::H264 and Codec::HEVC.
@param fps Framerate of the created video stream.
@param colorFormat OpenCv color format of the frames to be encoded.
@param encoderCallback Callbacks for video encoder. See cudacodec::EncoderCallback. Required for working with the encoded video stream.
Expand All @@ -246,9 +246,9 @@ public class opencv_cudacodec extends org.bytedeco.opencv.presets.opencv_cudacod

/** \brief Creates video writer.
<p>
@param fileName Name of the output video file. Only raw h264 or hevc files are supported.
@param fileName Name of the output video file.
@param frameSize Size of the input video frames.
@param codec Codec.
@param codec Supports Codec::H264 and Codec::HEVC.
@param fps Framerate of the created video stream.
@param colorFormat OpenCv color format of the frames to be encoded.
@param params Additional encoding parameters.
Expand Down Expand Up @@ -278,14 +278,24 @@ public class opencv_cudacodec extends org.bytedeco.opencv.presets.opencv_cudacod

/** \brief Deinterlacing mode used by decoder.
* @param Weave Weave both fields (no deinterlacing). For progressive content and for content that doesn't need deinterlacing.
* Bob Drop one field.
* @param Bob Drop one field.
* @param Adaptive Adaptive deinterlacing needs more video memory than other deinterlacing modes.
* */
/** enum cv::cudacodec::DeinterlaceMode */
public static final int
Weave = 0,
Bob = 1,
Adaptive = 2;

/** \brief Utility function demonstrating how to map the luma histogram when FormatInfo::videoFullRangeFlag == false
@param hist Luma histogram \a hist returned from VideoReader::nextFrame(GpuMat& frame, GpuMat& hist, Stream& stream).
@param histFull Host histogram equivelent to downloading \a hist after calling cuda::calcHist(InputArray frame, OutputArray hist, Stream& stream).
<p>
\note
- This function demonstrates how to map the luma histogram back so that it is equivalent to the result obtained from cuda::calcHist()
if the returned frame was colorFormat::GRAY.
*/
@Namespace("cv::cudacodec") public static native void MapHist(@Const @ByRef GpuMat hist, @ByRef Mat histFull);
// Targeting ../opencv_cudacodec/FormatInfo.java


Expand Down
Loading

0 comments on commit 7591bbf

Please sign in to comment.