View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

So, what about camera distortion? For communicating the information in an unambiguous manner in 2D printouts, there are a few better ways than the raw matrix.

The first best way is to display a deformed grid. This is readily intuitive and obvious to a person who has worked with cameras.

The second way is to display a normal map. This is readily obvious to someone who has worked with computer graphics extensively. Also, this data is easier to import into your software.

Okay, great! We have some good choices going on here for standards-oriented data design.

  • Yes, no trickery here. Although mere angles can be indicated using only two angular integers, the industry standard is to use three-component rectangular vectors. So, stick with that.

So. how will the Raspberry Pi user interface and hardware design look like? Here’s what I’ve determined given my requirements.

  • There will be a minimal number of hardware buttons for starters. These are connected to GPIO pins.

    • At least one button to advance to the next step. Alternatively/additionally, this one button controls “barcode command mode,” wheree the device checks if it can read a QR barcode indicating a specific command.

    • At least one button to reset to “start” state to redo preliminary calibration steps, possibly by restarting the operating system. This button can also be double-pressed to initiate a device shutdown.

    • Buying a pack of 5 or more buttons is recommended so that we have room for expansion on other projects such as single-handed typing, etc.

  • A 1-bit piezoelectric speaker to communicate with the user. This allows for very rich communication of basic state in a very small package: 12 notes on one octave, 132 notes with chords on an octave, and so on. LEDs, by contrast, are much less permissive to rich communication, but they do offer persistent visibility, rather than intermittent signaling as is typical through audio.

Read on →

So, to discuss the implementation of the linear regression algorithm in more detail. What algorithms will be used? Which libraries will I pick that implement my desired algorithm? Will I end up writing my own algorithm?

So, to answer these questions, we need to discuss the math in more detail so we know what we need and what we don’t need.

As discussed earlier, 16-bit linear unsigned integers will be used for light intensity data. The only other variable that needs to be correlated is time index or angle index. That, as I’ve just hinted, needs only an integer, not a floating point number. As it turns out, this means that the linear regression computation needs only integer arithmetic. Additionally, it turns out that there are more accurate and efficient methods for computing the row-reduced echelon solution of an integer matrix, namely the Bareiss algorithm. Gaussian elimination generally only works on floating point matrices.

Unfortunately, as it turns out, BLAS and LAPACK, the math libraries I was planning on using, do not have integer arithmetic methods, only floating point. Thus, I have to consider different libraries. IML – Integer Matrix Library, may be one choice, but it looks like that may actually use floating point under the covers because it depends on BLAS. Another option may be fflas-fpack, designed specifically for computing on finite fields (i.e. machine integers), but I think we are getting ahead of ourselves here.

Read on →

Important! Is there a way to get GPU-accelerated video decoding through FFMPEG? This is important so that we can have GPU acceleration for video scaling in our 3D scanning algorithms. Indeed, there is. There are plugins “codecs” for FFMPEG that do exactly that. So, good news to get this going on the Raspberry Pi quickly and efficiently. Unfortunately, there are reports of lower quality from using these algorithms for video encoding.

VDPAU, XVMC, VA API

20180217/DuckDuckGo ffmpeg gpu video scaling
20180217/https://stackoverflow.com/questions/5554933/ffmpeg-hardware-acceleration-gpu-directshow
20180217/https://stackoverflow.com/questions/18286334/convert-video-with-ffmpeg-using-gpu

20180217/https://en.wikipedia.org/wiki/VDPAU

Don’t bother, NVIDIA-only.

20180217/https://en.wikipedia.org/wiki/Nvidia_NVDEC
20180217/https://en.wikipedia.org/wiki/X-Video_Motion_Compensation
20180217/https://en.wikipedia.org/wiki/Video_Acceleration_API

Okay, let’s be particular to the Raspberry Pi. Looks like it is possible through FFMPEG.

Read on →

Interesting EOMA updates. Zero Phone, a phone built from a Raspberry Pi Zero, only costing $50 total.

20180202/https://www.crowdsupply.com/eoma68/micro-desktop/updates/fosdem-2018-shakti-project-tape-out-nearly-done-2-7-5-eoma68-a20-pcbs
20180202/https://www.crowdsupply.com/arsenijs/zerophone

Okay, now plans for myself. Even without HDMI, the micro desktop would be a great choice for my home server.

Important!

Red Hat notes.

This is what you need to do to install development tools on version 7 systems.

yum --setopt=group_package_types=mandatory,default,optional \
  groupinstall "Development Tools"

20180130/https://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/

Important! RHEL Red Hat CentOS notes. Assign a static IP address.

20180129/DuckDuckGo ?
20180129/https://unix.stackexchange.com/questions/52474/setup-static-ip-in-redhat-6#52475

In file: /etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0
BOOTPROTO=STATIC
IPADDR=192.168.0.5
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ONBOOT=yes

Done!

Updates on Spectre and Meltdown?

20180119/https://newsroom.intel.com/news/intel-security-issue-update-addressing-reboot-issues/
20180119/DuckDuckGo spectre meltdown
20180119/http://www.zdnet.com/article/spectre-and-meltdown-insecurity-at-the-heart-of-modern-cpu-design/

Good news. Raspberry Pi isn’t vulnerable to Spectre and Meltdown. Here’s why. They don’t use out-of-order execution, speculative execution, and branch prediction.

20180119/https://www.raspberrypi.org/blog/why-raspberry-pi-isnt-vulnerable-to-spectre-or-meltdown/

20180119/https://www.crowdsupply.com/eoma68/micro-desktop/updates

Oh, this is really interesting. The commentary about the popularity of the 3D printer at the Shenzen Maker Faire, the awards, and the demographics of those attending. More than 50% women, totally not the situation of the West. Also. makerspaces are well-attended over there.

20180119/https://www.crowdsupply.com/eoma68/micro-desktop/updates/a-tale-of-two-tools

Oh, this is really interesting. RISC-V can easily make it possible to get 64-bit on an embedded chip. However, there are a few missing things that need to be figured out first.

Read on →

Important! What is the advantage of a traditional DSLR camera over a light field camera? The primary advantage is the optical viewfinder. A light field camera requires digital processing to create a visible image, but a traditional SLR camera produces an excellent image that is visible within the optical viewfinder, no electronics required. Going for a mirrorless camera? There isn’t much advantage of a mirrorless camera over a light field camera, perhaps only in lower energy consumption.

Important! Here’s the specification for FastCGI. As this is a binary interface, it is plenty good to write C programs that use FastCGI. Also, it is recommended to write an entire web server and active code in C so that the system is as portable as possible.

20180117/https://en.wikipedia.org/wiki/FastCGI
20180117/https://web.archive.org/web/20160119141816/http://www.fastcgi.com/drupal/node/6?q=node%2F22

More web server protocols? SCGI? Cherokee web server? Verdict: SCGI is a no-go because it doesn’t support a C language binding, at least that’s what it looks like.

20180122/https://en.wikipedia.org/wiki/Simple_Common_Gateway_Interface
20180122/https://en.wikipedia.org/wiki/Cherokee_%28Webserver%29
20180122/https://en.wikipedia.org/wiki/C10k_problem

Read on →