Category Archives: Uncategorized
Zahnarzt Panorama Röntgenbild (Orthopantomographie)
JavaScript + HTML 5
ES6 (JavaScript version 6)
Handbook / Reference
Canvas
Eine kleine Canvas-Einführung
Let’s Call It A Draw(ing Surface)
HTML Canvas Reference
jQuery
$( document ).ready()
pure JavaScript equivalent to jQuery’s $.ready() how to call a function when the page/dom is ready for it
Python 2.7
EAFP is a Python acronym that stands for easier to ask for forgiveness than permission. This coding style is highly pushed in the Python community because it completely relies on the duck typing concept, thus fitting well with the language philosophy.
The concept behind EAFP is fairly easy: instead of checking if an object has a given attribute or method before actually accessing or using it, just trust the object to provide what you need and manage the error case.
Datatypes
Lists
An Introduction to Python Lists
Python Lists
Dict
Dictionaries
Python Dictionary
Add to a dictionary in Python?
Python add new item to dictionary [duplicate]
Iterators & Generators
Classes and Objects
Object Oriented Programming
Python’s Super is nifty, but you can’t use it
correct way to use super (argument passing)
Python 3 OOP Part 1 – Objects and types
Python 3 OOP Part 2 – Classes and members
Python 3 OOP Part 3 – Delegation: composition and inheritance
Python 3 OOP Part 4 – Polymorphism
Python 3 OOP Part 5 – Metaclasses
Python 3 OOP Part 6 – Abstract Base Classes
Logging
15.7. logging — Logging facility for Python
Logging HOWTO on docs.python.org
Logging Cookbook on docs.python.org
Good logging practice in Python
PyMOTW – logging – Report status, error, and informational messages
Python Guide – Logging
Datamodel
3.4.1. Basic customization (__init__, __str__, …)
Uniform Access Principle / Property / Class Attribute
“public” or “private” attribute in Python ? What is the best way?
Python Class Attributes: An Overly Thorough Guide
What’s the difference between a Python “property” and “attribute”?
Private Variables and Class-local References
Implementing Descriptors
old-style vs. new-style
New-style Classes
What is the difference between old style and new style classes in Python?
old-style and new-style classes in Python 2.7? [duplicate]
args and kwargs
Understanding kwargs in Python
*args and **kwargs? [duplicate]
What does ** (double star) and * (star) do for Python parameters?
Webserver / WSGI
Web Server Gateway Interface (WSGI) Servers
Documentation / docstring
sphinx.ext.napoleon – Support for NumPy and Google style docstrings
Example Google Style Python Docstrings
Example NumPy Style Python Docstrings
PEP 257 – Docstring Conventions
PEP 258 – Docutils Design Specification
numpy – How-to document
How to document a method with parameter(s)?
Sphinx Code Example
How to document fields and properties in Python?
How to document class attributes in Python?
Rewriting Python Docstrings With a Metaclass
PyCharm
File -> Settings -> Build, Execution, Deployment -> Python Debugger -> Collect run-time types information for code insight
Using Docstrings to Specify Types
Creating Documentation Comments
Generating Reference Documentation (DocUtils, Sphinx)
Python Integrated Tools (Docstring format: Plain, reStructuredText, Epytext)
Documenting Source Code in PyCharm (reStructuredText, Epytext)
PY-9795: wish list item: support for google python style type comments (sphinx.ext.napoleon)
Lasersaur Laser Cutter Software: Lasaur
Drawing Interchange Format (DXF)
Wikipedia: Drawing Interchange Format (DXF)
libdxf
LibreDWG
AutoCAD 2008 DXF Reference (PDF)
QCAD – 2D CAD for Windows, Linux and Mac
VisiCut – a userfriendly tool for laser-cutting
DXF File format _ Polyline
AutoCAD DXF File Format Summary
DXF.TXT – Drawing Interchange and File Formats
DXF10.spec – Drawing Interchange and File Formats
Minimum Requirements for Creating a DXF File of a 3D Model
Open Design Specification for .dwg files (PDF)
Structure Of DXF File Format
Chapter 6 — ENTITIES Section – POLYLINE
KLayout – DXF Format
DXF, Revision 12
Are there any libraries for parsing AutoCAD files?
QCAD – What is dxflib?
QCAD – Download dxflib (OpenSource)
Using AutoCAD file formats with open source libraries
0 #
SECTION # Section
2 #
HEADER # Header
9 #
$ACADVER # Key
1 #
AC1018 # Value
9 #
$ACADMAINTVER # Key
70 #
0 # Value
0 #
ENDSEC # End Section
[...]
0 #
SECTION # Section
2 #
ENTITIES # Section Name: "Entities"
0 #
POLYLINE # First Entity
5 #
40 # Polyline ID
330 #
1F #
100 #
AcDbEntity #
8 #
sheet # Layer Name: "sheet"
[...]
10 #
121.6670087034155 # Groupcode Start X: 121.6670087034155
20 #
166.9818181818182 # Groupcode Start Y: 166.9818181818182
30 #
0.0 # Groupcode Start Z: 0.0
0
VERTEX # Add new vertex
5 #
42 # Element Reference: 42
QCAD
FabScan 3D Scanner
$ sudo dd if=Downloads/fabscanpi_basic_stretch_v.2018-04-04-07-00.img of=/dev/mmcblk0 status=progress bs=1M conv=fsync
github.com/mariolukas/FabScanPi-Frontend, The web interface of the FabScanPi Server backend
github.com/mariolukas/FabScanPi-Server, FabScan Pi Open Source 3D Laser Scanner – Server application
github.com/mariolukas/FabScanPi-Build-Raspbian
github.com/watterott/RPi-FabScan-HAT/, Watterott RPi-FabScan-HAT
github.com/mariolukas/FabScanPi-Firmware/releases, Firmware of FabScanPi 3D Laser Scanner
Keyboard Configuration / Layout
Keyboard configuration in console
What is VC keymap?
mismatch of keyboard keys after booting onto LFS
Keyboard Settings
Keyboard Settings
Where are the keymaps in Debian? (Using loadkeys to change keymap.)
localectl list-keymaps: “Couldn’t find any console keymaps”?
Chaning keyboard layout
$ localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: n/a
X11 Layout: ch
X11 Model: pc105
X11 Variant: legacy
FabScan
$ sudo /etc/init.d/fabscanpi-server stop $ sudo /usr/bin/python /usr/bin/fabscanpi-server \ > --config=/etc/fabscanpi/default.config.json \ > --settings=/etc/fabscanpi/default.settings.json \ > --logfile=/var/log/fabscanpi/fabscanpi.log \ > --debug
Wifi
auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet dhcp auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp #pre-up iw dev wlan0 set power_save off #post-down iw dev wlan0 set power_save on
ctrl_interface=/var/run/wpa_supplicant
update_config=1
ap_scan=1
network={
ssid="FabLab_Winti"
scan_ssid=1
psk="PASSWORD"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
auth_alg=OPEN
}
Old
FabScan: The 100-Euro 3D Laser Scanner
FabScan CUBE
GitHub: FabScan-Shield
GitHub: FabScan 1.5
Anleitung: FabScan benutzen
Assembly Instructions
Bang good
650nm 5mW Focusable Red Line Laser Module Laser Generator Diode
Tools
VisiCut – a userfriendly tool for laser-cutting
GitHub: VisiCut
FAQ
$ sudo python fabscanpi-server --config=fabscan/config/default.config.json --settings=fabscan/config/default.settings.json
Traceback (most recent call last):
File "fabscanpi-server", line 8, in <module>
import fabscan
File "/home/pi/FabScanPi-Server/src/fabscan/__init__.py", line 7, in <module>
from fabscan.server import FSServer
File "/home/pi/FabScanPi-Server/src/fabscan/server/__init__.py", line 13, in <module>
from fabscan.FSVersion import __version__
ImportError: No module named FSVersion
$ cp /usr/lib/python2.7/dist-packages/fabscan/FSVersion.py /home/pi/FabScanPi-Server/src/fabscan
$ sudo python fabscanpi-server --config=fabscan/config/default.config.json --settings=fabscan/config/default.settings.json 2016-09-08 17:15:27,031 - fabscan.server - INFO - FabScanPi-Server v.0.2.1 2016-09-08 17:15:28,248 - fabscan.server.websockets - INFO - Websocket Server started on port 8010 2016-09-08 17:15:28,264 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Latest available firmware version is: v.20160620 2016-09-08 17:15:28,526 - fabscan.scanner.laserscanner.FSCamera - INFO - Camera module ready... avrdude-original: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude-original: Device signature = 0x1e950f avrdude-original: safemode: Fuses OK (E:00, H:00, L:00) avrdude-original done. Thank you. 2016-09-08 17:15:30,425 - fabscan.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7 2016-09-08 17:15:30,946 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0 2016-09-08 17:15:32,952 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Installed firmware version: v.20160620 2016-09-08 17:15:32,953 - fabscan.scanner.laserscanner.FSSerial - INFO - FabScanPi is connected to Arduino or FabScanPi HAT on port: /dev/ttyAMA0 2016-09-08 17:15:35,063 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Hardware controller initialized... 2016-09-08 17:15:35,067 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Laser Scan Processor initilized... 2016-09-08 17:15:35,073 - fabscan.FSScanner - INFO - Scanner initialized... 2016-09-08 17:15:35,074 - fabscan.FSScanner - INFO - Number of cpu cores: 4 2016-09-08 17:15:49,246 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET / HTTP/1.1" 200 - 2016-09-08 17:15:49,322 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /style/lib.css HTTP/1.1" 200 - 2016-09-08 17:15:49,374 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /style/app.css HTTP/1.1" 200 - 2016-09-08 17:15:49,380 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/lib.js HTTP/1.1" 200 - 2016-09-08 17:15:49,388 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/locales/en/i18n.js HTTP/1.1" 200 - 2016-09-08 17:15:49,396 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/app.js HTTP/1.1" 200 - 2016-09-08 17:15:49,455 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /icons/icon_scan.svg HTTP/1.1" 200 - 2016-09-08 17:15:51,259 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /fonts/fontawesome-webfont.woff2?v=4.3.0 HTTP/1.1" 200 - 2016-09-08 17:15:51,369 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET /api/v1/filters HTTP/1.1" 200 - 2016-09-08 17:15:51,481 - fabscan.server.websockets.FSWebSocket - DEBUG - New client connected 2016-09-08 17:15:52,108 - fabscan.FSScanner - DEBUG - Upgrade available:True DEBUG:fabscan.FSScanner:Upgrade available:True 2016-09-08 17:15:53,195 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Checking Hardware connections DEBUG:fabscan.scanner.laserscanner.FSScanProcessor:Checking Hardware connections 2016-09-08 17:16:22,572 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET /stream/laser.mjpeg HTTP/1.1" 200 - DEBUG:fabscan.server.FSHttpRequestHandler:192.168.1.199 - "GET /stream/laser.mjpeg HTTP/1.1" 200 - 2016-09-08 17:16:22,577 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /icons/spinner.gif HTTP/1.1" 200 - DEBUG:fabscan.server.FSHttpRequestHandler:127.0.0.1 - "GET /icons/spinner.gif HTTP/1.1" 200 - 2016-09-08 17:20:55,570 - fabscan.FSScanner - DEBUG - Close Settings DEBUG:fabscan.FSScanner:Close Settings
eth0 Link encap:Ethernet HWaddr b8:27:eb:83:80:63
inet addr:192.168.1.200 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2001:8e0:9ff:1428:ba27:ebff:fe83:8063/64 Scope:Global
inet6 addr: fd00:1::ba27:ebff:fe83:8063/64 Scope:Global
inet6 addr: fe80::ba27:ebff:fe83:8063/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:449155 errors:0 dropped:0 overruns:0 frame:0
TX packets:110572 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:122088557 (116.4 MiB) TX bytes:95758002 (91.3 MiB)
$ sudo python fabscanpi-server --config=fabscan/config/default.config.json --settings=fabscan/config/default.settings.json
[sudo] password for pi:
2016-09-08 18:39:43,245 - fabscan.server - INFO - FabScanPi-Server v.0.2.1
2016-09-08 18:39:44,329 - fabscan.server.websockets - INFO - Websocket Server started on port 8010
2016-09-08 18:39:44,347 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Latest available firmware version is: v.20160620
2016-09-08 18:39:44,608 - fabscan.scanner.laserscanner.FSCamera - INFO - Camera module ready...
avrdude-original: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude-original: Device signature = 0x1e950f
avrdude-original: safemode: Fuses OK (E:00, H:00, L:00)
avrdude-original done. Thank you.
2016-09-08 18:39:46,509 - fabscan.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2016-09-08 18:39:47,029 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2016-09-08 18:39:48,544 - fabscan.scanner.laserscanner.FSCamera - DEBUG - PI Camera Moule ready.
2016-09-08 18:39:49,036 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Installed firmware version: v.20160620
2016-09-08 18:39:49,037 - fabscan.scanner.laserscanner.FSSerial - INFO - FabScanPi is connected to Arduino or FabScanPi HAT on port: /dev/ttyAMA0
2016-09-08 18:39:51,147 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Hardware controller initialized...
2016-09-08 18:39:51,152 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Laser Scan Processor initilized...
2016-09-08 18:39:51,158 - fabscan.FSScanner - INFO - Scanner initialized...
2016-09-08 18:39:51,159 - fabscan.FSScanner - INFO - Number of cpu cores: 4
2016-09-08 18:40:14,505 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET / HTTP/1.1" 200 -
2016-09-08 18:40:14,536 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/locales/en/i18n.js HTTP/1.1" 200 -
2016-09-08 18:40:14,549 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/app.js HTTP/1.1" 200 -
2016-09-08 18:40:14,558 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /style/lib.css HTTP/1.1" 200 -
2016-09-08 18:40:14,568 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /style/app.css HTTP/1.1" 200 -
2016-09-08 18:40:14,571 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/lib.js HTTP/1.1" 200 -
2016-09-08 18:40:14,579 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /icons/icon_scan.svg HTTP/1.1" 200 -
2016-09-08 18:40:15,362 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /fonts/fontawesome-webfont.woff2?v=4.3.0 HTTP/1.1" 200 -
2016-09-08 18:40:15,441 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET /api/v1/filters HTTP/1.1" 200 -
2016-09-08 18:40:15,542 - fabscan.server.websockets.FSWebSocket - DEBUG - New client connected
2016-09-08 18:40:16,115 - fabscan.FSScanner - DEBUG - Upgrade available:True
DEBUG:fabscan.FSScanner:Upgrade available:True
2016-09-08 18:40:17,219 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Checking Hardware connections
DEBUG:fabscan.scanner.laserscanner.FSScanProcessor:Checking Hardware connections
2016-09-08 18:40:17,356 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET /stream/laser.mjpeg HTTP/1.1" 200 -
DEBUG:fabscan.server.FSHttpRequestHandler:192.168.1.199 - "GET /stream/laser.mjpeg HTTP/1.1" 200 -
2016-09-08 18:40:17,362 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /icons/spinner.gif HTTP/1.1" 200 -
DEBUG:fabscan.server.FSHttpRequestHandler:127.0.0.1 - "GET /icons/spinner.gif HTTP/1.1" 200 -
2016-09-08 18:40:23,177 - fabscan.FSScanner - INFO - Start command received...
INFO:fabscan.FSScanner:Start command received...
2016-09-08 18:40:23,202 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Scan started
INFO:fabscan.scanner.laserscanner.FSScanProcessor:Scan started
2016-09-08 18:40:23,288 - fabscan.vision.FSImageWorker - INFO - Creating 4 image worker processes.
INFO:fabscan.vision.FSImageWorker:Creating 4 image worker processes.
2016-09-08 18:40:23,721 - fabscan.server.FSHttpRequestHandler - ERROR - [Errno 32] Broken pipe
ERROR:fabscan.server.FSHttpRequestHandler:[Errno 32] Broken pipe
2016-09-08 18:40:28,859 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET //stream/texture.mjpeg HTTP/1.1" 200 -
DEBUG:fabscan.server.FSHttpRequestHandler:192.168.1.199 - "GET //stream/texture.mjpeg HTTP/1.1" 200 -
2016-09-08 18:42:40,316 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Finishing texture scan.
INFO:fabscan.scanner.laserscanner.FSScanProcessor:Finishing texture scan.
2016-09-08 18:42:40,354 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Started object scan initialisation
INFO:fabscan.scanner.laserscanner.FSScanProcessor:Started object scan initialisation
2016-09-08 18:42:40,462 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 814
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 814
2016-09-08 18:42:40,468 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 815
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 815
2016-09-08 18:42:40,479 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 812
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 812
2016-09-08 18:42:40,636 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 813
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 813
2016-09-08 18:42:46,545 - fabscan.scanner.laserscanner.FSImageProcessor - DEBUG - 259.2
DEBUG:fabscan.scanner.laserscanner.FSImageProcessor:259.2
2016-09-08 18:42:46,549 - fabscan.scanner.laserscanner.FSImageProcessor - DEBUG - Laser on backwall detected at x-pixel position: 317
DEBUG:fabscan.scanner.laserscanner.FSImageProcessor:Laser on backwall detected at x-pixel position: 317
2016-09-08 18:42:46,553 - fabscan.scanner.laserscanner.FSImageProcessor - DEBUG - Found a point for laser angle calculation
DEBUG:fabscan.scanner.laserscanner.FSImageProcessor:Found a point for laser angle calculation
2016-09-08 18:42:46,555 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Detected Laser Angle at: 33.012678 deg
DEBUG:fabscan.scanner.laserscanner.FSScanProcessor:Detected Laser Angle at: 33.012678 deg
2016-09-08 18:42:46,556 - fabscan.vision.FSImageWorker - INFO - Creating 4 image worker processes.
INFO:fabscan.vision.FSImageWorker:Creating 4 image worker processes.
Process FSImageWorkerProcess-8:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/pi/FabScanPi-Server/src/fabscan/vision/FSImageWorker.py", line 135, in run
self.image.save_image(image_task.image, image_task.progress, image_task.prefix, dir_name=image_task.prefix+'/laser_'+image_task.raw_dir)
File "/home/pi/FabScanPi-Server/src/fabscan/file/FSImage.py", line 34, in save_image
Process FSImageWorkerProcess-5:
Traceback (most recent call last):
os.makedirs(dir_name)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
mkdir(name, mode)
OSError: [Errno 17] File exists: '/usr/local/fabscanpi/scans/20160908-184023/laser_raw'
File "/home/pi/FabScanPi-Server/src/fabscan/vision/FSImageWorker.py", line 135, in run
self.image.save_image(image_task.image, image_task.progress, image_task.prefix, dir_name=image_task.prefix+'/laser_'+image_task.raw_dir)
File "/home/pi/FabScanPi-Server/src/fabscan/file/FSImage.py", line 34, in save_image
os.makedirs(dir_name)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: '/usr/local/fabscanpi/scans/20160908-184023/laser_raw'
2016-09-08 18:42:50,665 - fabscan.server.FSHttpRequestHandler - ERROR - [Errno 32] Broken pipe
ERROR:fabscan.server.FSHttpRequestHandler:[Errno 32] Broken pipe
Process FSImageWorkerProcess-6:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/pi/FabScanPi-Server/src/fabscan/vision/FSImageWorker.py", line 138, in run
points = self.image_processor.process_image(angle, image_task.image, color_image)
File "/home/pi/FabScanPi-Server/src/fabscan/scanner/laserscanner/FSImageProcessor.py", line 87, in process_image
points = self.process_line(pixels, angle , color_image)
File "/home/pi/FabScanPi-Server/src/fabscan/scanner/laserscanner/FSImageProcessor.py", line 272, in process_line
line1 = self.computeLineFromPoints(camera_position, point)
File "/home/pi/FabScanPi-Server/src/fabscan/scanner/laserscanner/FSImageProcessor.py", line 326, in computeLineFromPoints
line.a = (p2.z-p1.z)/(p2.x-p1.x)
ZeroDivisionError: float division by zero
2016-09-08 18:48:08,641 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Finishing object scan.
INFO:fabscan.scanner.laserscanner.FSScanProcessor:Finishing object scan.
2016-09-08 18:48:17,749 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 828
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 828
2016-09-08 18:49:40,068 - fabscan.server.websockets.FSWebSocket - DEBUG - Client disconnected
DEBUG:fabscan.server.websockets.FSWebSocket:Client disconnected
$ cat /etc/fabscanpi/default.config.json
{
"folders": {
"www": "/usr/share/fabscanpi/",
"scans": "/home/pi/scans/"
},
"laser": {
"numbers": 1
},
"scanner_type": "laserscanner",
"calibration": {
"weight_matrix": [],
"dist_camera_matrix": [],
"pattern": {
"square_size": 11,
"rows": 6,
"columns": 8,
"origin_distance": 35
},
"camera_matrix": [],
"distortion_vector": [],
"laser_planes": [
{
"deviation": 0,
"distance": 0,
"normal": []
}
],
"platform_translation": [],
"platform_rotation": []
},
"meshlab": {
"path": "/usr/bin/"
},
"process_numbers": 4,
"turntable": {
"steps": 6400,
"radius": 70
},
"camera": {
"resolution": {
"width": 1640,
"height": 1232
},
"preview_resolution": {
"width": 320,
"height": 240
},
"rotate": "True",
"hflip": "True",
"vflip": "False",
"type": "PICAM"
},
"serial": {
"baudrate": 57600,
"autoflash": "True",
"port": "/dev/ttyAMA0"
},
"texture_illumination": 140
Canon PIXMA MX535
Videobearbeitung / Video Editor
List of video editing software
Shortcut
OpenShot
FFmpeg (CLI only!)
Inactive
VLMC – VideoLAN Movie Creator
VirtualDub
How to flip a video 180° (vertical/upside down) with FFmpeg?
Videofilm um 180 Grad drehen?
$ ffmpeg -i VID_20150227_105125.mp4 -vf "rotate=PI:bilinear=0,format=yuv420p" -m etadata:s:v rotate=0 -codec:v libx264 -codec:a copy VID_20150227_105125_180.mp4
ffmpeg version N-70348-g9564375 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --ena ble-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --e nable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-lib gsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencor e-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enabl e-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-l ibtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable- libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-l ibwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --ena ble-lzma --enable-decklink --enable-zlib
libavutil 54. 19.100 / 54. 19.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 23.106 / 56. 23.106
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20150227_105125.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2015-02-27 09:52:53
location : +47.4959+008.7180/
location-eng : +47.4959+008.7180/
Duration: 00:01:26.44, start: 0.000000, bitrate: 14490 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yu vj420p(pc), 1280x720, 14400 kb/s, SAR 1:1 DAR 16:9, 29.99 fps, 30 tbr, 90k tbn, 25 tbc (default)
Metadata:
rotate : 180
creation_time : 2015-02-27 09:52:53
handler_name : VideoHandle
Side data:
displaymatrix: rotation of 180.00 degrees
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, flt p, 96 kb/s (default)
Metadata:
creation_time : 2015-02-27 09:52:53
handler_name : SoundHandle
[swscaler @ 0000000000554320] deprecated pixel format used, make sure you did se t range correctly
[libx264 @ 0000000002e60860] using SAR=1/1
[libx264 @ 0000000002e60860] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0000000002e60860] profile High, level 3.1
[libx264 @ 0000000002e60860] 264 - core 144 r2525 40bb568 - H.264/MPEG-4 AVC cod ec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 r ef=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed _ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pski p=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 deci mate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_ adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=2 5 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.6 0 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'VID_20150227_105125_180.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
location-eng : +47.4959+008.7180/
location : +47.4959+008.7180/
encoder : Lavf56.23.106
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1 280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandle
creation_time : 2015-02-27 09:52:53
rotate : 0
encoder : Lavc56.26.100 libx264
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 96 kb/s (default)
Metadata:
creation_time : 2015-02-27 09:52:53
handler_name : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 47 fps=0.0 q=0.0 size= 0kB time=00:00:02.04 bitrate= 0.2kbits/s frame= 61 fps= 55 q=29.0 size= 111kB time=00:00:02.04 bitrate= 443.1kbits/ frame= 73 fps= 45 q=29.0 size= 181kB time=00:00:02.04 bitrate= 724.3kbits/ frame= 85 fps= 40 q=29.0 size= 276kB time=00:00:02.04 bitrate=1102.9kbits/ frame= 96 fps= 36 q=29.0 size= 352kB time=00:00:04.05 bitrate= 710.4kbits/ frame= 109 fps= 34 q=29.0 size= 452kB time=00:00:04.05 bitrate= 913.9kbits/ frame= 121 fps= 33 q=29.0 size= 528kB time=00:00:05.05 bitrate= 855.1kbits/ frame= 2585 fps= 19 q=-1.0 Lsize= 25078kB time=00:01:26.44 bitrate=2376.6kbits/s
video:23971kB audio:1014kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.375647%
[libx264 @ 0000000002e60860] frame I:14 Avg QP:21.65 size: 33711
[libx264 @ 0000000002e60860] frame P:1166 Avg QP:24.39 size: 14372
[libx264 @ 0000000002e60860] frame B:1405 Avg QP:26.87 size: 5206
[libx264 @ 0000000002e60860] consecutive B-frames: 10.7% 43.2% 22.2% 24.0%
[libx264 @ 0000000002e60860] mb I I16..4: 16.7% 70.9% 12.3%
[libx264 @ 0000000002e60860] mb P I16..4: 3.7% 9.8% 1.0% P16..4: 51.8% 10.3% 4.8% 0.0% 0.0% skip:18.7%
[libx264 @ 0000000002e60860] mb B I16..4: 0.3% 0.9% 0.1% B16..8: 43.4% 3.4% 0.5% direct: 2.0% skip:49.3% L0:43.8% L1:53.0% BI: 3.2%
[libx264 @ 0000000002e60860] 8x8 transform intra:67.6% inter:82.2%
[libx264 @ 0000000002e60860] coded y,uvDC,uvAC intra: 44.9% 57.4% 10.9% inter: 14.2% 21.4% 0.2%
[libx264 @ 0000000002e60860] i16 v,h,dc,p: 24% 26% 13% 37%
[libx264 @ 0000000002e60860] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 17% 25% 5% 6% 6% 9% 8% 5%
[libx264 @ 0000000002e60860] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 23% 16% 4% 7% 7% 11% 6% 3%
[libx264 @ 0000000002e60860] i8c dc,h,v,p: 55% 19% 20% 6%
[libx264 @ 0000000002e60860] Weighted P-Frames: Y:7.2% UV:2.7%
[libx264 @ 0000000002e60860] ref P L0: 65.0% 14.3% 15.0% 5.6% 0.2%
[libx264 @ 0000000002e60860] ref B L0: 83.6% 14.7% 1.7%
[libx264 @ 0000000002e60860] ref B L1: 94.2% 5.8%
[libx264 @ 0000000002e60860] kb/s:2278.86
Pure C Linked List
- SLIST
- LIST
- SIMPLEQ
- TAILQ
- CIRCLEQ
- struct list_head (include/linux/list.h)
- utlist.h
- SGLIB
Doubly Linked Lists in C
Some linked list C macro questions
‘Multipurpose’ linked list implementation in pure C
SGLIB – A Simple Generic Library for C
utlist: linked list macros for C structures