Tag Archives: computer

Quaternions – Use them for Rotation and Transformation

This is the second tutorial on Quaternions. In the previous post, I explained how to use basics of quaternions from the pyquaternion python library. Check the previous post here. In this post, I will show you how to perform spatial … Continue reading

Posted in Linux, Machine Learning, programming, Python, Robotics, ROS, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Compress files in MATLAB without other file compression software – Method 1, ZIP-UNZIP

You can easily zip a file (or a set of files) in MATLAB without requiring any external compression software being installed on your machine. This is useful to be able to compress files while still in MATLAB. In this post, … Continue reading

Posted in Linux, MATLAB, programming, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Investigating code performance in MATLAB – Part 1: For-loop

Here I want to show you a very simple example in MATLAB. Consider we have a large matrix (can be an image also) and we want to perform element-wise operation on the matrix elements. Let’s first create a large matrix: … Continue reading

Posted in Linux, MATLAB, Optimization, programming, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 4 Comments

Convert a grayscale image into a black-white image in MATLAB without im2bw

In MATLAB there is a function ‘im2bw’ which converts an input image into a black&white image. You can provide the function with a level of thresholding otherwise the default value is 0.5. Here I show you how to implement the … Continue reading

Posted in Linux, Machine Learning, MATLAB, OpenCV, Optimization, programming, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

People we should get to know – Part 1: John Bardeen

John Bardeen was a physicist and electrical engineer who have won the Nobel Prize twice. He is the only person who managed to won the Nobel prize twice in physics. The first time, he won the prize for the invention … Continue reading

Posted in Thoughts | Tagged , , , , , , , , , , , , , , , | Leave a comment

Estimating the value of Pi using Python (For educational Purposes)

You can estimate the value of `Pi` up to specific precision with the following method: 1- draw a square and draw the corresponding circle inside it (a quarter of the circle inscribed inside the square). So the edge length of … Continue reading

Posted in Linux, programming, Python, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Step-by-step Tutorial on Face Detection with MATLAB – Part 1

This is a step-by-step, easy to use, beginner level, and detailed tutorial for face detection with MATLAB. Let’s start!! List available devices In order to list the available webcams that can be detected and used by MATLAB do as follows: … Continue reading

Posted in Linux, Machine Learning, MATLAB, OpenCV, programming, Robotics, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Convert Images in MATLAB to different file formats (bmp, gif, hdf, jpg, jpeg, jp2, jpx, pbm, pgm, ppm, pnm, pcx, png, ras, tif, tiff, xwd)

In MATLAB you can easily convert your image from a specific format to another format in the following list: bmp, gif, hdf, jpg, jpeg, jp2, jpx, pbm, pgm, ppm, pnm, pcx, png, ras, tif, tiff, xwd. Although here I mention … Continue reading

Posted in Linux, MATLAB, OpenCV, programming, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Simple Object Detection in 3 lines of Code (OpenCV/Python)

The main 3 lines of code is as follows: We read the original image in the first line using the imread function. By passing the 0 flag to this function the output would be a grayscale image. The resulting image … Continue reading

Posted in Linux, Machine Learning, OpenCV, programming, Python, Robotics, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 3 Comments

Read, write, show images in OpenCV (Python)

In order to load or read an image you can use imread function. In order to display an image you can use imshow function. After you applied some changes to an Image you can write it into the disk. In … Continue reading

Posted in Linux, Machine Learning, OpenCV, programming, Python, Robotics, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment