Mehran Maghoumi

Author's posts

Tracking down BadImageFormatException in C#

I know It’s been quite some time since my last post, but what can I say? I’ve been quite busy 🙂 Here is the latest issue that I got stuck on for a few hours, and I thought I’d share what worked in the end. I was working on a large C# project that had a …

Continue reading

librealsense with ARM support

Recently, I was able to successfully use RealSense R200 on my NVIDIA Jetson TX1 with librealsense. I had to replace some SSSE3 instructions in the code to get it to compile under ARM. I created a fork of librealsense on Github with all the changes I made. Check it out here: ttps://github.com/Maghoumi/librealsense R200 works at 60 FPS …

Continue reading

Create Bootable USB Flash Drive from ISO Image (with UEFI Support)

Update: If you’re looking for Windows 10 UEFI installation, take a look at the addendum at the end of the post! Although there are a lot of applications for creating a bootable flash drive using an ISO image (such as UNetBootin), not many of them support the creation of a bootable flash drive that can be used …

Continue reading

Align Depth and Color Frames – Depth and RGB Registration

Sometimes it is necessary to create a point cloud from a given depth and color (RGB) frame. This is especially the case when a scene is captured using depth cameras such as Kinect. The process of aligning the depth and the RGB frame is called “registration” and it is very easy to do (and the …

Continue reading

C++ Function in Header throws Linker “already defined” Errors

If you define a function in the global namespace in a C++ header file and encounter linker errors (complaining about the function already defined elsewhere), there’s a simple fix! Simply mark the function as inline. This will prevent the duplication of the function in other source files. Note that using inclusion guards does not solve …

Continue reading

CGAL Point in Polyhedron Algorithm

The “point in polygon” or “point in polyhedron” is a classic computer graphics problem. The goal is to determine whether a given point is inside a polygon (in 2D) or a polyhedron (in 3D). One solution to the problem is shooting a ray originating from the said point to an arbitrary direction and determine the number …

Continue reading

Undo a Git Commit on GitHub

In case you’ve pushed an unwanted commit to GitHub (or any upstream Git repository), you can simply undo it. To do so, move the HEAD to the commit that you want to undo to and then run the following command: git push -f origin HEAD^:master

Prevent Unity 3D Text from Always Appearing on Top while Maintaining Rich-Text Support

The TextMesh component in Unity has an annoyance which causes the text that it displays be rendered always on top. This is useful if you want your GUI elements to always appear on top but if you want to have a 3D text attached to a 3D object, this creates the weirdest results! There’s already …

Continue reading

SimpleScalar Installation Under Windows

Installing the SimpleScalar simulator is relatively straightforward under Linux. For Windows installation, the Cygwin toolchain is required. Grab the latest Cygwin installer (setup-x86_64) from here: https://cygwin.com/setup-x86_64.exe (note that this is intended for 64-bit machines). After running the installer, just proceed through the wizard. The default installation directory is C:\cygwin64. When selecting a mirror website, usually mirrors.kernel.org is the …

Continue reading

Installing SciPy, NumPy and matplotlib Under Cygwin

Today I tried installing these modules under Cygwin with pip. The whole thing took a few hours to figure out thanks to crappy bundled packages that pip fetches and lack of consistency between helps available online. To install pip, you need to have `python3-setuptools`installed. Then using the `easy_install3 pip` command you can install pip. After that, …

Continue reading