Category Archives: development

Create HBITMAP from Fl_RGB_Image

Here is a simple code for convert Fl_RGB_Image to HBITMAP.

It should be help to convert Fl_RGB_Image ( must have depth 4 for RGBA ) to HBITMAP. And it works for changing Fl_Window to Layered window easily like this.

And it may runs as this.

How to set debug mode easily for libusb and libuvc.

Here is a tip for programer for debug any application with using libusb(x) or libuvc.

There’s many way to debug what it going on with gbd when you are using gcc or MinGW (incl. MinGW-W64) , you may feels somehow difficult to control gdb to debug in deep call stacks without IDE like Code::Blocks.

You can use putenv() to set debug mode to print all messages to ‘stdout’ (aka. console, or terminal) .

Preparation

Enable debugging message

Meaning of number appends LIBUSB_DEBUG is this level :

When you enabel this, you can see all debugging messages on your terminal or console.

Developing libuvc for MinGW-W64, day 1

Now I am trying to get YUV2 buffer from formal USB camera, but it doesn’t easy on Windows system. MS designed most of USB video devices need to use Direct media layer, but it occurs many different problems while using OpenGL or hardware accelerated surface at same instance of Windows application.

So I made it from starting understand UVC and common library of libuvc.

And I understood it depends on libusb that is well known libraray for multiple platforms except Windows. So I have to make it building ways as like Makefile on MSYS and for MinGW-W64, then it comes to Josh Blake’s libusbx to customized for build in MinGW-W64 and MSYS easily.

But it still has many problems, exactly same failure for -12 ( UNSUPPORTED ).

It belongs to failure of libusb_open() returns -12 through libuvc error result. Testing open USB HD Camera with libusb or libusbx always same.

It must be study for what different Windows USB drivers, and why UVC not able to open with formal libusb, further need to understand libusb-win32 or libusbk.

So I reached same position again, Windows is not my option, really.

Make your picture to bright ! MIOH(DR)

It was finally released beta build for Mac OS X (Tested with El Capitan and High Sierra) 64bit native application to my open source repository. You can download it here in totally free !

About MIOH

This program is an open source project as GPLv3. Everybody can use my prebuilt binary in totally free, but source code may open to use in commercial. Or make your own new program with my source codes, it should be avoid license, maybe 🙂

Make Image O’ HDR is based on 3 different algorithms to boost your image to has high dynamic range as we seeing everything on our eyes.

How to use ?

Here explains how could it be able enhancing my picture for better than before, as like Pro !

First at all, you may download latest version of application for your OS in here. MIOH now supporting two different OS, Windows 64 and Mac OS X 64. Specially Windows 64 binaries contained normal (SSE3 SIMD + OpenMP) and avx (AVX SIMD + OpenMP). Mac OS X not supporting OpenMP now because built in LLVM-GCC not able to use OpenMP.

When you had ran this application ( Mac OS X users may need open in CMD+click, or right mouse click with selecting Open in popup memu, then agree to open ), you can see just like this.

Don’t be worry, just drag your picture file to application or Open a file with icon that contins “+” as you can see. It may not hurts you !

 

MIOH supporting JPEG, PNG and windows-BMP formatted image now, Most of your picture may loaded to this application, and it will appeared what contains in file.

You can rotate your picture in each CW 90 or CCW 90 degrees by pressing Command(or Control) and left or right arrow key, or select rotating icon on toolbar. MIOH not automatically rotates your picture by reading EXiF meta information.

You can change each different filters ( Log mapping, Reinhard and eCLAHE ) with different parameters with get hint when your mouse pointer stay on each parameter input, and just click to a Check button to apply changes from your previous picture. It is easy way to get new picture with few clicks.

Okay, now you can save new picture with PNG formatted file, or copy to clipboard with Command(or Control) C. MIOH will copy processed picture to your clipboard to maximum long width or height of 2048px resized.

You can paste clipboard image to your own graphic editor, or any application.

Just download it and uses for your better picture! Make your picture to HDR now, it’s free.

 

References

MIOH(MIOHDR) used my open source libraries.

 

Now Removu S1 supports firmware upgrading for Mac OS X.

It’s been a long waiting, Ha!

Now Removu S1 supports Mac OS X with their new Mac OS X app. Sure it made with native codes with llvm-gcc and FLTK 1.3.4-1-ts of my git clone, thanks anyway.

It was started from their Windows based (actually made with M$VS C# and WTF… no! WPF ? whatever sucks strange GUI hmm … dot NET ?, you know what it is, actually I can not sure) but I couldn’t made anything with their Chinses commented source code, ever. Because it was only runs on Windows, and serial communicating not compatibled with any POSIX, ahh … what a beautiful situation, hugh ?

So I made it whole codes from my open sources, try to make communicate with S1 device on Mac OS X and Linux for while, and I need cold reboot MUCH times by goddam Silicon Labs’ MotherFather driver ( holy sheeeeet thanks to them ), And actually had success to match the argument of S1 packets, it was really hard way.

Now Mac OS X users may understand my previous blurred effect graphics, Just enjoy !

_ps_

I was made it with Mint Linux, but Essel-T seems not planned to support Linux, that’s so sad news.

Making boosting image signal for stereographics…

There maybe many different ways to detect depth of object, but it depends on reflecting signal intense to indentifying the changing of trace.

So I am now making a new fast and ineffective algorithm with these steps, gamma, median and applying my own algorithm of edge enhancement, then muxing it’em all with source original signals to complete image. Testing was completed in integer world, and planned to step next for floating points.

How to know my gcc OpenMP version ?

Here’s some easy way to know my gcc support what version of OpenMP in compiling level.

First, type this to your shell ( not Windows )

echo | cpp -fopenmp -dM | grep -i open

You may see one of these.

  • 200505 = version 2.5
  • 200805 = version 3.0
  • 201107 = version 3.1
  • 201307 = version 4.0
  • 201511 = verison 4.5

Or trying to make a complete code with Makefile with my source: omptest

Extract omptest.zip to anywhere able to approach with bash (or MSYS, MinGW shell too), then move to position where you been extract.

Just type make. A test named executabled binary (or test.exe if your system is Windows) may genertated, then jsut run it.

You may see what version of OpenMP supported by your gcc compiler.

 

Now working on R* S1 FW Writer for Mac OS X.

For some people to waited for long, it will comes out soon what about firmware upgrading program for Mac OS X. Now I am working on it in Linux and Mac OS X by my multi-platform availed libraries.

Wait for more days, it will release on manuafacturer home page, and you will be happy.

Here’s old version of developing of GUI sequence, you may hope this graphics may exactly same on Mac OS X. (even more faster and smooth !)

sset to C or H converting open source.

There’s nothing to find information about sset ( I was misunderstood it may s-record ), so I made a simple tool for supporting multi-platform if have any GCC with STL.

You can clone or download source code ( it is MIT license ) and build in your system with just typing “make” then, enjoy it.

It was tested on Windows MinGW-W64 and Mint Linux 18.2 GCC 5.2 with Mac OS X llvm-gcc. You can change {anyname of file}.sset to C or H file with options here:

For example, let converting preview.sset file to cam_previewmode.c,

sset2c preview.sset -s=cam_preview_1080p -t=msm_camera_i2c_reg_array cam_previewmode.c

You can decide symbol name and structure name ( you may know what structure name to be written before understanding platform driver structures ) by making a converted file.

And result is like this,

You can simply changes many register setting arrays at once with my open source code here: