Discussion:
[SDL] C++ & SDL2 - New Lightweight Image Processing Library
dfalkcreative
2016-10-05 13:11:35 UTC
Permalink
Hey all, I've been spending the past month or so developing a portable library for manipulating SDL2 surfaces prior to texture conversion. I've just uploaded it to GitHub so that you can download it and hopefully try it out (and maybe even add to it if you have some good ideas!) I'm also very open to criticism on my techniques in C++ (Self taught over the past decade; I'm bound to have picked up some bad habits here and there, but I am always trying to improve).

It currently depends on SDL2 and SDL2_image (for loading additional file types), however text will be coming soon as well through SDL2_ttf. Still very much a work in progress, I'd eventually like to possibly use it as a very lightweight alternative to OpenCV or even Matlab (ambitious, I know).

Link: https://github.com/dfalkcreative/sdl2_image_processing_library

It supports the vast majority of functions found in the 'transform.h' file, including some really cool histogram graphing functionality. It also supports kernel operations for blurring, embossing, etc. and adjustment algorithms for modifying brightness, contrast, highlights, shadows, gamma, etc. Another cool feature is the 'Trace' function to outline a pseudo-binary surface (I say pseudo here because the values generated are either 0 or 255, rather than 0 or 1). For higher accuracy, it is recommended that you first Blur the surface before passing the Trace function. It could open up possibilities for some really interesting object tracking and analysis functions, photogrammetry, etc. I am also in the process of developing some simple, yet powerful GUI functionality that you'll be able to add to your own projects, so stay tuned for that.

I'm also very new to GitHub, so I apologize if I messed anything up on there (in which case, definitely let me know so I don't make the same mistakes in the future!). This is basically the first time that I've posted any of my personal code online. Be sure to submit any feature requests and ideas, I want this thing to be extremely useful for anybody using it.

Note: I've originally posted this on Reddit yesterday, so if you'd like to follow that thread as well, the link is https://www.reddit.com/r/cpp/comments/55w9uf/csdl2_lightweight_and_easytouse_image_processing/
Loading...