GERARDO MORA - FAB ACADEMY

Week 02: Computer-Aided Design

This week, we were introduced to computer-aided design (CAD). The Fab Academy program focuses on teaching digital fabrication techniques, and CAD is the initial step in transforming an idea into digital data that can be realized using fabrication equipment. For this week's assignment, we evaluated various 2D and 3D software programs to select the ones we will use throughout the Fab Academy assignments and our final project. We also reviewed tools for image and video compression.

Work log

Completed tasks

  • Selected and evaluated 2D and 3D CAD software (pending).
  • Demonstrated and described processes used in modelling with 2D and 3D softwares (pending).
  • Demonstrated image and video compression (pending).

Evidence

1. What is CAD?

2. Evaluating 3D CAD software

3. Evaluating 2D CAD software

4. Image and video compression

Documentation often lacks completeness without images and videos to support written content. However, image and video files tend to be large, which can result in slower loading times on websites. Additionally, our Fab Academy repositories must not exceed 100 MB in size by the end of the program. Therefore, using image and video compression tools is essential to meet the size requirements for repositories and to enhance the accessibility of our repository websites, especially for users with slow internet connections.

Image and video compression reduce the amount of data needed to store or transmit visual content. There are two main types of compression. The first type is lossless compression, where no information is permanently discarded, allowing the original file to be perfectly reconstructed. The second type is lossy compression, which discards some information to create much smaller files, typically resulting in a minor loss of visible quality.

4.1. Image compression

Image compression reduces the file size of individual images while aiming to maintain acceptable quality for accurately depicting content. This process eliminates redundancy and less noticeable visual details. Our instructors recommended consistently uploading images to our repositories in JPEG format. JPEG, which stands for Joint Photographic Experts Group, is an international organization that standardized this format during the late 1980s and early 1990s. A JPEG file supports up to 24-bit color and utilizes lossy compression to decrease image file size, making storage and transmission more convenient.

The following are the filename extensions for JPEG images:

  • .jpg
  • .jpeg
  • .jpe
  • .jif
  • .jfif
  • .jfi

JPEG files were designed to deliver photorealistic images to small screens worldwide. However, their compression technique discards colors that the human eye cannot distinguish and averages out color variations. This file format supports up to 16.8 million colors while maintaining a relatively small size, ensuring compatibility with most browsers, software, and applications.

The process I chose for image compression involves using the Windows Snipping Tool app, WhatsApp messages, and the online image compression tool FabCompress, which was developed by Rafael Perez Aguirre.

Given that the core of Fab Academy is teaching digital fabrication techniques, it is essential for us to inform our peers and instructors about the processes we utilized to complete our assignment tasks. These processes often involve preparing manufacturing files on a computer, making a tool for capturing screen frames necessary. For this purpose, I have chosen to use the Snipping Tool, which is preinstalled on most Windows distributions. The Snipping Tool can be accessed by pressing the Windows key + Shift + S or by typing "Snipping Tool" directly into the Windows search bar.

Windows Snipping Tool Search
Windows Snipping Tool Menu

Once we can visualize Snipping Tool's main window, we can click on the + symbol in the top left corner to capture a frame from our computer screen. Starting the process will change our cursor from an arrow to a cross. With our cursor in this state, we can click on a specific region of our screen and start dragging it to draw a rectangle that captures the desired area. After capturing the frame, we can edit our image by adding figures or drawings to highlight certain elements. After editing our image, we can save it in a desired folder.

The following video shows the process of capturing a frame using the Snipping Tool:

As mentioned earlier, I will use FabCompress to compress the images in my repositories. In fact, FabCompress has successfully compressed every image displayed on this page. FabCompress is an online tool, which means it is not necessary to install it on a personal computer. The main window of FabCompress provides options for setting the output format of our image files, maximum width and height, and quality. Additionally, this tool supports batch compression, allowing multiple images to be compressed simultaneously.

FabCompress Tool

Aside from computer screenshots, documentation often requires photos taken with a camera, usually a smartphone. In this case, I opted to transfer images from my phone to my computer using the WhatsApp messaging app. The key to effective image compression through WhatsApp is to send the pictures as chat images instead of files. This method compresses the images while still preserving impressive quality. To demonstrate the results of WhatsApp image compression, I have chosen this image that I captured with my smartphone.

Palm_Compressed

The original image details indicate that the file size is 11 MB, which is more than a tenth of the 100 MB my repository should weigh by the end of Fab Academy.

Original Details

The key to effectively compressing images through WhatsApp is to send them as chat images instead of as files. We can send the picture to ourselves and then open the WhatsApp messaging app on our personal computers to download the image we sent.

WhatsApp Chat
WhatsApp Image Download

By sending the picture through a WhatsApp chat, the file size decreased from 11 MB to just 181 KB. While this reduction is impressive, the file can still be further compressed using the FabCompress tool.

WhatsApp Compression

4.2. Video compression

Video compression retains some full frames while mainly focusing on the differences between frames, taking advantage of the similarities that frequently occur among them. Our local instructor, Oliver Ochoa García, suggested using FFmpeg for video compression. FFmpeg stands for Fast Forward Moving Picture Experts Group. FFmpeg is a command-line multimedia engine that reads, converts, compresses, filters, and writes audio/video data using different codecs and containers. You can download the specific version for your operating system by clicking here.

The following are the main FFmpeg components:

  • Container: A file format that holds the media streams; examples include MP4, MKV, AVI, and MOV.
  • Codec: Method employed to encode and decode audio or video data. Examples of video codecs include H.264, H.265, AV1, and MPEG-4. Examples of audio codecs include AAC, MP3, and Opus.
  • Bitrate: Amount of data used per second of audio or video. Bitrate is usually measured in kilobits per second (kbps) or megabits per second (Mbps). A higher bitrate usually means better quality and a larger file size, while a lower bitrate usually means a lower quality and a smaller file size.
  • Resolution:The number of pixels in each frame of an image or video; a higher resolution means more detail and more pixels to encode, resulting in larger files or a higher required bitrate. Resolution represents how many pixels exist, while bitrate is about how much data is used to represent them. Examples of resolution include 1280 × 720 = 720p, 1920 × 1080 = 1080p, and 3840 × 2160 = 4K.

After downloading and decompressing the folder containing the FFmpeg tool, it is beneficial to add the FFmpeg folder to the PATH. The PATH is an environment variable that stores a list of directories where the operating system looks for executable programs. This addition simplifies the execution of inline commands when using FFmpeg.

FFMPEG.exe
Search For environmental-Variables
Environment Variables Button
Path Selection Compressed
Edit Environment Variable Menu
Environmental Variable Added
FFMPEG detected
Entering Video Folder and detecting file
          ffmpeg -i input.mp4 -vf "scale=-2:720" -c:v libx264 -preset slow -crf 30 -pix_fmt yuv420p -movflags +faststart -an output_new.mp4
          
File Compression Prompt
Video Compression Results
Snipping Tool File Results

Reflection

What went well, what was hard, what you’d do differently.

Back to Weekly Assignments