In general for Linux it’s better to install ImageJ directly instead ofapt install imagej.
This method also works for Raspberry Pi and other ARM systems.
Install Java Runtime Environment (also works with openjdk-jre)
apt install default-jre
Download
latest platform independent ImageJ
Unzip to ~/ImageJ recursively
unzip ij*.zip -d ~
Add to ~/.bash_aliases
aliasimagej="$HOME/ImageJ/ImageJ"
Close and reopen Terminal, then start ImageJ by:
imagej
Create Imagej icon by creating file ~/.local/share/applications/imagej.desktop with contents:
If Ubuntu gives popup messages about auto-adding “new” printers upon connecting to a wired or WiFi network, try the configuration below.
Stop auto-add printer on network connect by editing /etc/cups/cups-browsed.conf:
BrowseRemoteProtocols none
Then restart CUPS from Terminal:
service cups restart
Test: reboot PC with network disconnected, check that the offending printers are not in Settings → Printers, and then connect to the network and verify that the printers don’t auto-add again.
Like other Brother printers we’ve used, the HL-3170CDW works great from Linux.
With Ubuntu, the Gutenprint USB driver automatically came up and worked fine.
The OEM driver below is optional.
Download
linux-brprinter-installer script
from “Driver Install Tool”.
Plug in HL-3170 via USB. Don’t skip the mkdir step or the installer will hang!
You may wonder why Linux shows less than full “signal bars” for Wifi, even for a device relatively close to the Wifi AP (Access Point, the “router”).
The answer is that the Linux desktop GUI is being honest about the quality of the connection, which is immediately relevant to the data throughput and connection latency.
The end user shouldn’t care as much about raw RF signal strength (e.g. -70 dBm) as they should about the quality (SNR) of that connection.
Of course, low signal strength < -80 dBm also causes low SNR and hence decreased link quality, even in relatively clear Wifi signal environments.
Unfortunately, many OEMs (and tech websites on click-commission) have duped people into buying expensive individual APs instead of quality APs such as from Ubiquiti that can be distributed evenly throughout the home or office.
You actually typically want to lower transmit power from the default level to around +18..+21 dBm to help the user devices roam between APs for best performance, and to disconnect promptly as a user moves off-premises.
In a particular client site with suboptimally configured Wifi network, the GNOME desktop environment (and also in Unity desktop) 2 out of 3 signal bars for WiFi, despite being connected at MCS index 15 to an 802.11n AP on 5 GHz with a signal strength approaching -50 dBm.
MCS 15 is the fastest possible connection for 802.11n, so why does GNOME/Unity show only moderate “signal bars”?
This is because there are very many other high utilization APs on the same channel so that SNR (“link quality” for many Wifi cards in iwconfig) is low (less than say 0.7 normalized).
Home and business Wifi users will virtually always get better performance from:
multiple low-power APs instead of single high-power AP
5 GHz instead of 2.4 GHz
APs set to the clearest possible Wifi channels (such as DFS)
APs placed as much as possible to interior of environment, high on wall or ceiling
iterative tuning of the system to minimize co-channel high utilization APs
The goal is for the AP to not “hear” other off-premises Wifi or other on-channel wireless activity, since generally the AP due to siting and high performance chipset “hears” significantly better than the end user devices.
Some Windows-oriented computers like Microsoft Surface with “Connected Standby” or “Modern Standby” may not be well supported in Suspend / Sleep with Linux yet.
Consider having such a system lock on lid close until the Linux kernel is updated to support these newer power states.
For better security in general, shut the laptop down while in transit in case of loss or theft.
Locking screen with screen turned off gives sufficient power savings for short walks.
Force Linux lock on lid close with a systemd-based Linux distro such as Ubuntu by editing “/etc/systemd/logind.conf”, uncommenting line:
HandleLidSwitch=lock
Reboot the computer and verify lock behavior on lid close.
Reference:
Microsoft
description
of traditional S3 standby vs. connected standby vs. modern standby
Lock on lid close may not work when the laptop is physically docked, but does generally work when the laptop is out of dock. Do the manual lock if this doesn’t work when physically docked.
Intel Distribution for Python utilizes the conda package manager, set to the “intel” channel.
Pros: Intel Python uses highly accelerated math library versions of popular packages like Numpy, Scikit-learn, etc. reside.
Cons: Intel Python is slow to update to new library versions.
Anaconda updates within a couple days, but Intel might take weeks or months to update the libraries.
Note that standard Anaconda Python already gives MKL performance in some libraries like Numpy and Scipy.
We generally use the regular Anaconda instead of Intel Python to get updated libraries with most of them having MKL.
The convex hull is frequently used to process a pixel region.
To find the indices of the outer edge of the convex hull may be accomplished using the distance transform.
I do not claim this to be the most efficient method.
This algorithm gives similar results to Matlab boundarymask().
By definition, the distance transform of all region edge pixels to the background is identically one.
The chamfer distance transform is suitable for smooth regional boundaries, and has significant speed advantages over more brute force approaches that may be more generally applicable for non-smooth boundaries.
Use either masked image arrays or use NaN as a
sentinel value in 2-D array mask.
SciPy ≥ 0.17 is assumed.
It’s a good idea to breakup project code into distinct subdirectories.
It can be useful to have a CMakeLists.txt for each of these directories that are included from the top-level CMakeLists.txt.
Assume a C project with subdirectory io/ and top-level CMakeLists.txt:
Build a little test script in io/ directory to test just HDF5 I/O,
and compile the whole program from the top level directory, then test the main program and subdirectory libraries:
ctest --test-dir build -V
CMake Directory variables: to refer to the parent project directory use ${PROJECT_SOURCE_DIR}.
If using nested projects, ${CMAKE_SOURCE_DIR} refers to the highest level CMakeLists.txt directory
Edit all CMakeLists.txt recursively: on Linux / Unix systems, edit all CMakeLists.txt in a project with a command like
Array broadcasting (no bsxfun() needed) is in
Matlab
and
GNU Octave
Array broadcasting can minimize copying of large arrays in memory or excessive looping over arrays, both of which can be very inefficient.
However, there are certain cases particularly with JIT compilers where looping can be faster than array broadcasting.
Often the clean, clear code enabled by array broadcasting outweighs those edge-case possible gains.
As always, make a simple benchmark if you’re concerned about a particular case (broadcast vs. loop) and for Python try Numba.
If A has size 4x5 and B has shape 1x5, A .* B, A + B etc. just work without bsxfun(), provided the N-D array dimension multiplied is of matching shape.
This is important for clarity and conciseness of syntax.
bsxfun() is a factor that drove me to using Python over Matlab almost entirely.
A .* B
can result in
error: operator *: nonconformant arguments (op1 is 5x4, op2 is 1x5)
Assuming A and B are compatibly shaped when transposed, try:
A .* B.'
Use .' to transpose because ' means take the Hermetian (complex conjugate) transpose.
Remember that Matlab does memory copies (expensive for large arrays) on transpose.
Python transposes are “free” O(1) since they’re just a view into the original array (pointer tricks).
Programs earlier than these versions did require bsxfun().
Program
minimum version
Matlab
R2016b
Octave
3.6.0
Fortran 95 brought function
spread()
for efficient array broadcasting by replicating the array in memory.