Visual Code
2018-11-05 21:32

#notatnik
inv_map = {v: k for k, v in my_map.items()}
===============projektaspnetcore
dodać jwt i websocket delete/add each of switch or reload all
wykorzystac nosql db i dodać app dla ip
=============== stackoverflow
https://stackoverflow.com/que[...]upyter-notebook-with-anaconda
=============== featres extraction, moments,
In image processing, computer vision and related fields, an image moment is a certain particular weighted average (moment) of the image pixels' intensities, or a function of such moments, usually chosen to have some attractive property or interpretation.

Image moments are useful to describe objects after segmentation. Simple properties of the image which are found via image moments include area (or total intensity), its centroid, and information about its orientation.
http://www.sci.utah.edu/~geri[...]dvImProc-MomentInvariants.pdf
When features are defined in terms of local neighborhood operations applied to an image (a procedure commonly referred to as feature extraction) one can distinguish between feature detection approaches that produce local decisions whether there is a feature of a given type at a given image point or not, and those who produce non-binary data as result. The distinction becomes relevant when the resulting detected features are relatively sparse. Although local decisions are made, the output from a feature detection step does not need to be a binary image. The result is often represented in terms sets of (connected or unconnected) coordinates of the image points where features have been detected, sometimes with subpixel accuracy.

zernike moments niezmiennik rotacji, wielkość ma znaczenie

When feature extraction is done without local decision making, the result is often referred to as a feature image. Consequently, a feature image can be seen as an image in the sense that it is a function of the same spatial (or temporal) variables as the original image, but where the pixel values hold information about image features instead of intensity or color. This means that a feature image can be processed in a similar way as an ordinary image generated by an image sensor. Feature images are also often computed as integrated step in algorithms for feature detection
In the field of images, features might be raw pixels for simple problems like digit recognition of well-known Mnist dataset. However, in natural images, usage of simple image pixels are not descriptive enough. Instead there are two main steam to follow. One is to use hand engineered feature extraction methods (e.g. SIFT, VLAD, HOG, GIST, LBP) and the another stream is to learn features that are discriminative in the given context (i.e. Sparse Coding, Auto Encoders, Restricted Boltzmann Machines, PCA, ICA, K-means).

“Oriented FAST and rotated BRIEF” (ORB) features. Each feature yields a binary descriptor; those are used to find the putative matches.
https://www.researchgate.net/[...]ge_Image_processing_in_Python

A feature vector is just a vector containing multiple elements (features). The features may represent a pixel or a whole object in an image. Examples of features are color components, length, area, circularity, gradient magnitude, gradient direction, or simply the gray-level intensity value. It depends on which features are useful for the application at hand. Some people compute special features using image processing and computer vision techniques and some people just use the original pixel intensities as features.
Example: v = [R; G; B]; is a feature vector containing color components of a pixel or an object.
In a typical object recognition application, feature vector of a query object is compared with that of each object in a database to know how much the query object matches with each object in the database. There are many techniques to compare two feature vector. One of them is just the Euclidean distance between the feature vectors of two objects.
===============conda
Upgrade wszystkich pakietów przy pomocy pip

import pkg_resources
from subprocess import call

packages = [dist.project_name for dist in pkg_resources.working_set]
call("pip install --upgrade " + ' '.join(packages), shell=True)

conda activate envName
deactivate
conda remove --name envName --all

conda env export > environment.yml
conda list --explicit > spec-file.txt
conda env create -f environment.yml

conda install --name myenv --file spec-file.txt
conda create --name myenv --file spec-file.txt

conda info --envs
conda env list

=====================
Cl-eye to 32 bit sterownik, opencv 64 bit nie może wykryć kamety
anacona 32 bit +
conda install -c conda-forge ffmpeg
conda install -c conda-forge opencv // bardzo ciekawa wersja opencv-feedstock aktualnie dziala na <3.6.5
lub wspierany jest również pip install opencv-pyton + contrib
https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

=============
CreateProcess error=2

@Trevor Jobling,this is very old but for what its worth,  i fixed this by editing the workspace.xml file inside the repo i was workign on. It was pointing to an invalid python location:
file located here: "<local project location>\.idea\workspace.xml"

the script that wouldnt work was test_scripts.py. "SDK home" was pointing to an old location of python. i found this with a control+f of the error path

<configuration name="test_scripts" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="C:\ProgramData\Anaconda2\python.exe" />
Marcin.Miga

Przy pomocy pip to wiele ciekawszych rzeczy można robić... :)