* Add minimal pyproject.toml
* Update README for Python compile and install
* Remove duplicate meta
* Fix pixel saturation in interpolate_quadratic (#2806)
* Fix pixel saturation in interpolate_quadratic
* Use pixel_type_t alias
* cleanup
---------
Co-authored-by: Adrià Arrufat <1671644+arrufat@users.noreply.github.com>
Co-authored-by: Davis King <davis@dlib.net>
Why does this happen: `float` data should be aligned to 4 bytes [1], but this is not guaranteed when the truth data is `uint16_t` and is in the buffer before the weights data
Solution: re-arrange the buffer so that the weights data (type `float`) comes before the truth data (type `uint16_t`), essentially making it so that the `float` data is correctly aligned to 4 bytes
[1] https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#device-memory-accesses
* typo
* - added compile time information to audio object. Not convinced this is needed actually. I'm perfectly happy just using the ffmpeg::frame object. I'm pretty sure I'm the only user who cares about audio.
- created resizing_args and resampling_args
* smaller videos for unit tests
* shorter videos for unit tests
* - decoder and demuxer: you now resize or resample at the time of read. therefore you don't set resizing or resampling parameters in constructor, but you pass them to read()
- added templated read() function
- simplified load_frame()
* inherit from resizing_args and resampling_args
* reorganised the tests to segragate decoding, demuxing, encoding and muxing as much as possible
* much more basic example
* demxing examples split
* examples
* fixing examples
* wip
* Fix load_frame()
* added frame - specific tests
* - makes sense to have a set_params() method rather than constructing a new object and moving. I mean, it works and it absolutely does the right thing, and in fact the same thing as calling set_params() now, but it can look a bit weird.
* notes on defaults and good pairings
* Update ffmpeg_demuxer.h
Watch out for `DLIB_ASSERT` statements. Maybe one of the unit tests should build with asserts enabled.
* Update ffmpeg_details.h
* Update ffmpeg_muxer.h
* WIP
* WIP
* - simplified details::resizer
- added frame::set_params()
- added frame::clear()
- forward packet directly into correct queue
* pick best codec if not specified
* added image data
* warn when we're choosing an appropriate codec
* test load_frame()
* - for some reason, you sometimes get warning messages about too many b-frames. Resetting pict_type suppresses this.
- you can move freshly decoded frames directly out.
* callback passed to push()
* I think it's prettier this way
* WIP
* full callback API for decoder
* updated tests
* updated example
* check the template parameter is callable and has 1 argument first before getting it's first argument
* Potential bug fix
* - write out the enable_if's explictly. It's fine. I think it's clear what's going on if someone cares
- guard push() with a boolean which asserts when recursion is detected
* pre-conditions on callbacks: no recursion
---------
Co-authored-by: pf <pf@me>
Co-authored-by: Your name <you@example.com>
* Allow the scan parameters to be changed in a detector.
* Fix warning.
* Fix for clang on osx which std::chrono::system_time has a duration in microseconds not nanoseconds. ^
* Revert "Allow the scan parameters to be changed in a detector."
This reverts commit 2a5760aacf.
* Fix second instance.
* Static not needed when inline.
---------
Co-authored-by: Charles Galambos <charles@reactai.com>
Co-authored-by: Davis E. King <davis685@gmail.com>
* added callable traits
* tests
* use compiler intrinsic if possible
* workaround for gcc < 7.5
* - added nargs
- bug fix - use std::decay_t
- added more tests.
- one of the unit tests show cases why this is cool
* docs
* more docs
* Update dlib/type_traits.h
* Update dlib/type_traits.h
---------
Co-authored-by: pf <pf@me>
Co-authored-by: Davis E. King <davis685@gmail.com>
* Add initial version of a generic draw_solid_polygon
* Use image view to be truly generic
* Improve draw_solid_convex_polygon when antialias is disabled
* Remove unused parameter and fix documentation
* Use rectangle methods
* Remove redundant check
* Remove unused variable
* Update dlib/image_transforms/draw.h
---------
Co-authored-by: Davis E. King <davis685@gmail.com>
* Add ffmpeg::load_frame
* Add ffmpeg::save_frame
* Check for supported encoders
* Add documentation
* Add pfeatherstone suggestions and enable only for RGB images
* Remove the pixel format setting, as it is not needed
* Fix formatting in error message
* Set pixel format in ffmpeg::save_frame
* Fix formatting
* Remove ffmpeg::save_frame
* Remove convert_to_utf32 from imglab by updating widgets methods
* Use convert_to_utf32 in draw_string for images
* Add an overload of draw_string for string literals
* Improve UTF-8 support for draw_string
* Add ugly hack to make it work
* Unify all convert_utf8_to_utf32 implementations
* Rename convert_utf8_to_utf32 to convert_to_utf32
* Remove code related to GCC 4, since it's no longer supported
* Format is_combining_char according to dlib codestyle and remove pragmas
* Rename convert_utf8_to_utf32 to convert_to_utf32
* Complete the convert_to_utf32 function
* Fix build on untested OS
* Try to fix compilation in Windows
* Update docs and replace typedef with using
* Add back especialized conversions to UTF-32
* Add requires clause to convert_to_utf32
* Update dlib/unicode/unicode_abstract.h
---------
Co-authored-by: Davis E. King <davis685@gmail.com>
* muxing
* Add HSV support (#2758)
* Add HSV support
* Add tests
* Update dlib/pixel.h
Co-authored-by: Adrià Arrufat <1671644+arrufat@users.noreply.github.com>
* Add HSV struct and make more things const
---------
Co-authored-by: Davis E. King <davis685@gmail.com>
* Fix imglab changing the current dir too soon (#2761)
* A bit of cleanup
---------
Co-authored-by: pf <pf@me>
Co-authored-by: Adrià Arrufat <1671644+arrufat@users.noreply.github.com>
Co-authored-by: Davis E. King <davis685@gmail.com>
Co-authored-by: Davis King <davis@dlib.net>
* Add HSV support
* Add tests
* Update dlib/pixel.h
Co-authored-by: Adrià Arrufat <1671644+arrufat@users.noreply.github.com>
* Add HSV struct and make more things const
---------
Co-authored-by: Davis E. King <davis685@gmail.com>
* docs
* callbacks for encoder
* shorter video
* shorter video
* added is_byte type trait
* leave muxer for next PR
* added overloads for set_layout() and get_layout() in details namespace
* unit test
* example
* build
* overloads for ffmpeg < 5
* Update examples/ffmpeg_video_encoding_ex.cpp
Co-authored-by: Adrià Arrufat <1671644+arrufat@users.noreply.github.com>
* Update dlib/media/ffmpeg_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* as per suggestion
* remove requires clause
* Update examples/ffmpeg_video_encoding_ex.cpp
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_muxer.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* use dlib::logger
* oops
* Update dlib/media/ffmpeg_muxer.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/media/ffmpeg_demuxer.h
* Update dlib/media/ffmpeg_demuxer.h
* Update dlib/media/ffmpeg_abstract.h
---------
Co-authored-by: pf <pf@me>
Co-authored-by: Davis E. King <davis685@gmail.com>
Co-authored-by: Adrià Arrufat <1671644+arrufat@users.noreply.github.com>
* - enhanced list_muxers()
- added fail() error handling helper function
- moved framerate setting to decoder_image_args
* docs
* oops
* - don't use std::endl, use `\n` instead
- use fail(). See, on average, it removes lines of code
* convenient constructor for demuxer
* ffmpeg5 support
* added docs for == -1
* oops
* grouping audio channel compatibility stuff together
* more compatibility stuff
* more channel abstractions
* build with ffmpeg 5
* install assembler
* cache the installation
* cmake doesn't like using ~ in filepath
* at some point this will work
* i think i need to change the key
* test FFmpeg-n5.1.3_try3 cache
* bug fix
* Update build_cpp.yml
Giving this another go
* Update build_cpp.yml
Disable building documentation and CLI tools
* Update CMakeLists.txt
Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included
* - use environment variables
- on ubuntu 18 gcc7, use ffmpeg 3.2.18
* correct way of dereferencing variables ?
* can't get variables to work
* Revert "can't get variables to work"
This reverts commit 5eef96a43e.
* Revert "correct way of dereferencing variables ?"
This reverts commit e8ff95f5c6.
* Revert "- use environment variables"
This reverts commit a6938333d5.
* using ffmpeg 3.2.18 with ubuntu18 gcc7
* Update build_cpp.yml
Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable
* Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled
* Fixed bad indentation
* Can go in details namespace
* Update dlib/CMakeLists.txt
Co-authored-by: Davis E. King <davis685@gmail.com>
* use details namespace
* remove declaration. It's in details now
* don't need get_channels_from_layout()
---------
Co-authored-by: pf <pf@me>
Co-authored-by: Davis E. King <davis685@gmail.com>
* Add simple polygon class
* Add documentation for fill_convex_polygon
* Rename alpha_blend to antialias
* Update dlib/geometry/polygon_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/geometry/polygon_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/geometry/polygon_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/geometry/polygon_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/geometry/polygon_abstract.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update dlib/geometry/polygon.h
Co-authored-by: Davis E. King <davis685@gmail.com>
* Update documentation for get_convex_shape
* Add tests for the polygon class
* Remove new line
---------
Co-authored-by: Davis E. King <davis685@gmail.com>