fixed some functions' arguments, inlined some other simple functions
This commit is contained in:
@@ -30,13 +30,35 @@ class ImageManipulator {
|
||||
int const t_width,
|
||||
int const t_height);
|
||||
|
||||
/// \brief Copy assignment operator
|
||||
[[nodiscard]] auto operator=(const ImageManipulator& other)
|
||||
-> ImageManipulator;
|
||||
/**
|
||||
* \brief Copy assignment operator
|
||||
*
|
||||
* Copy assignment operator, will copy all of the input’s members except for
|
||||
* its mutex, a new one will be generated.
|
||||
*
|
||||
* \param[in] other Element to copy
|
||||
* \return ImageManipulator
|
||||
*/
|
||||
[[nodiscard]] inline auto operator=(const ImageManipulator& other)
|
||||
-> ImageManipulator
|
||||
{
|
||||
return ImageManipulator(other);
|
||||
}
|
||||
|
||||
/// \brief Move assignment operator
|
||||
[[nodiscard]] auto operator=(ImageManipulator&& other) noexcept
|
||||
-> ImageManipulator;
|
||||
/**
|
||||
* \brief Move assignment operator
|
||||
*
|
||||
* Move assignment operator, will move all of the input’s members except for
|
||||
* its mutex, a new one will be generated.
|
||||
*
|
||||
* \param[in] other Element to move
|
||||
* \return ImageManipulator
|
||||
*/
|
||||
[[nodiscard]] inline auto operator=(ImageManipulator&& other) noexcept
|
||||
-> ImageManipulator
|
||||
{
|
||||
return ImageManipulator{std::move(other)};
|
||||
}
|
||||
|
||||
/// \brief Execute the nth method on the current object
|
||||
void exec_method(int const t_nb_method,
|
||||
@@ -45,11 +67,19 @@ class ImageManipulator {
|
||||
int const t_rows,
|
||||
int const t_submethod);
|
||||
|
||||
/// \brief Write the generated image to the output path
|
||||
void write_file() const;
|
||||
/**
|
||||
* \brief Write the generated image to the output path
|
||||
*
|
||||
* Write the generated image as a file to the specified path stored in the
|
||||
* object
|
||||
*/
|
||||
inline void write_file() const
|
||||
{
|
||||
cv::imwrite(output_path_, generated_image_);
|
||||
}
|
||||
|
||||
/// \brief Returns a reference to the generated image
|
||||
[[nodiscard]] auto const& get_generated_image() const noexcept
|
||||
[[nodiscard]] inline auto const& get_generated_image() const noexcept
|
||||
{
|
||||
return generated_image_;
|
||||
}
|
||||
@@ -72,12 +102,12 @@ class ImageManipulator {
|
||||
[[nodiscard]] auto get_controlled_square_values() const noexcept;
|
||||
/// \brief Generates a candidate for image generation improvement
|
||||
[[nodiscard]] auto create_candidate(bool const t_controlled_size) const;
|
||||
/// \brief Generates organized views of the reference image for method 5
|
||||
/// \brief Generates organized views of the reference image for method 5
|
||||
[[nodiscard]] auto generate_tiles(int const t_cols, int const t_rows) const;
|
||||
/// \brief Gets all colors from the reference image
|
||||
void get_color_set();
|
||||
/// \brief Threaded helper for \ref get_color_set
|
||||
void threaded_get_color(int t_h);
|
||||
void threaded_get_color(int const t_h);
|
||||
/// \brief Draw a square on an image
|
||||
void draw_square(cv::Mat& t_img,
|
||||
cv::Point const& t_top_left,
|
||||
@@ -85,8 +115,8 @@ class ImageManipulator {
|
||||
cv::Scalar const& t_color) const;
|
||||
/// \brief Update this object’s generated image
|
||||
void update_gen_image(cv::Mat const& t_img, double const t_diff);
|
||||
/// \brief Merges tiles generated by method5
|
||||
void merge_tiles(std::vector<std::vector<ImageManipulator>> t_tiles);
|
||||
/// \brief Merges tiles generated by method5
|
||||
void merge_tiles(std::vector<std::vector<ImageManipulator>> const& t_tiles);
|
||||
/// \brief First method as described in the
|
||||
/// [report](https://labs.phundrak.fr/phundrak/genetic-images/blob/master/report/report.pdf)
|
||||
void method1();
|
||||
|
||||
Reference in New Issue
Block a user