Skip to content

Simplify imgproc class.#32

Merged
kalwalt merged 7 commits intodevfrom
simplify-imgproc-class
Nov 25, 2022
Merged

Simplify imgproc class.#32
kalwalt merged 7 commits intodevfrom
simplify-imgproc-class

Conversation

@kalwalt
Copy link
Owner

@kalwalt kalwalt commented Nov 24, 2022

As stated in this comment i will try to simplify and improve the imgproc class. At this time the methods aretoo Emscripten orientedin the sense they are specifically designed to be compiled directly with EMscripten, but if you want to use them internally with C++ code (and then after compiled with Emscripten) it can be hard or worste ca scenario near impossible. I will try to simplify the grayscale's methods and then if i can others. This is a necessary step for PR #31.

List of changes:

  • simplify grayscale's methods.
  • remove if else for Emscripten grayscale, instead add if define only for the Emscripten version.
  • improve and simplify pyrdown.
  • simplified warp.
  • simplified resample.
  • use templating as possible.

@kalwalt kalwalt self-assigned this Nov 24, 2022
@kalwalt
Copy link
Owner Author

kalwalt commented Nov 25, 2022

I fixed the Imgproc grayscale binding, but i noticed that pyrdwon example create only black pyramids. Need to see where it's broken, probably one of latest changes.

@@ -268,10 +268,10 @@ class Imgproc : public Math {

dst->resize(w2, h2, src->get_channel_m());

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems strange to me that this can not copy the data, i will fill an issue for this.

@kalwalt kalwalt merged commit 280d62e into dev Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant