Monday, December 4, 2017

Javascript switch


<label class="switch">
<input type="checkbox" onchange="editModeChanged(this);" checked>
<span class="slider round"></span>
</label>

function editModeChanged(switchValue)
{
console.log($(switchValue).is(':checked'));
}

Monday, November 20, 2017

Most common CAD/BIM file formats

1. DWG – This format is almost universally accepted by most model viewing/authoring programs. Also commonly referred to as CAD files, this might be the most ubiquitous digital file format in the AEC industry (and beyond). Anytime someone mentions “layers,” they are likely referring to a DWG file. Generally, these files are editable in any CAD-based program such as Autodesk AutoCADGraphisoft ArchiCAD, and Bentley MicroStation.
A common misconception with DWG files is that they only contain 2D information. Although that is typically true, DWG files can absolutely contain 3D objects as either basic planes or full components (known as “blocks”).
2. DXF – A very close cousin to the DWG, DXFs can be a little larger in file size but are also layer-based and a very commonly accepted format in most platforms.
3. IFC – These are arguably the most information-rich BIM files out there and can be opened by a number or programs including Autodesk Revit and Navisworks. These are similar to PDFs in that they are not meant to be edited and are a read-only format.
4. RVT – This is Autodesk’s proprietary format for Revit files. These can vary significantly in size depending on the level of development. They can only be opened in Revit.
5. NWD – This is Autodesk’s proprietary format for Navisworks files. NWD files are also read-only, although you may be able to save them under a new name and edit from there if the file was saved with that option enabled. These can only be open in Navisworks Freedom or Navisworks Manage.

Using webcam with MatLab

Go to Add-on Explorer 
Search for the package called; "Image Acquisition Toolbox Support Package for OS Generic Video Interface" and install

Monday, October 16, 2017

OpenMVG (Open Multiple View Geometry) Ubuntu Installation Guide


Dependencies:

(1) Install the latest cmake:
 
$ sudo apt-get install cmake

(2) Install Git:

$ sudo apt-get update
$ sudo apt-get install git


(3) Install GCC:

$ sudo apt install gcc-7


(4) Install QT V5.4 (Optional)


Getting the resources and the submodules:

(1) $ git clone --recursive https://github.com/openMVG/openMVG.git

(2) Install the required external libraries:
$ sudo apt-get install libpng-dev libjpeg-dev libtiff-dev libxxf86vm1 libxxf86vm-dev libxi-dev libxrandr-dev

(3) If you want to view graph svg logs, install graphviz;
$ sudo apt-get install graphviz

(4) Build OpenMVG

$ git clone --recursive https://github.com/openMVG/openMVG.git
$ cd openMVG
$ cd ..
$ mkdir openMVG_Build
$ cd openMVG_Build

(5) If you want unit tests and examples:
$ cmake -DCMAKE_BUILD_TYPE=RELEASE -DOpenMVG_BUILD_TESTS=ON -DOpenMVG_BUILD_EXAMPLES=ON . ../openMVG/src/

Otherwise simply:
$ cmake -DCMAKE_BUILD_TYPE=RELEASE . ../openMVG/src/

(6) Compile the project
$ make



Thursday, October 12, 2017

Pinta: Easy to use photo editor (like paint) in Ubuntu

Open terminal with CTRL+ALT+T Add Pinta stable PPA repository:
sudo add-apt-repository ppa:pinta-maintainers/pinta-stable
Note: Instead of pinta-stable you can add pinta-daily if you like to test latest and the greatest Pinta, but it may be buggy.
Update system package lists:
sudo apt-get update
Install pinta:
sudo apt-get install pinta 

Wednesday, October 11, 2017

Feature points and descriptors which are free for commercial applications

Feature points:
  • CORNERS: HARRIS, FAST,
  • REGIONS: MSER,
  • BLOBS: AKAZE.
Descriptors:

  • BINARY: M-LDB (see AKAZE paper), BRIEF, Nested shape descriptor,
  • FLOATING POINT: DAISY, LIOP descriptors.

Wednesday, October 4, 2017

html video loop and autoplay with page load

<!DOCTYPE html>
<html>
<body>

<video width="320" height="240" autoplay loop>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>

<p><strong>Note:</strong> The video tag is not supported in Internet Explorer 8 and earlier versions.</p>

</body>
</html>

Wednesday, September 27, 2017

HTML horizontal break

Just don't want to search again every time :)

<b style="word-space:2em">&nbsp;&nbsp;</b>

Thursday, March 9, 2017

Creating a short path for a very long path

command prompt:

This command creates a x:\ path as an image of the myVeryVeryLongPath:
subst x: C:\myVeryVeryLongPath

This command deletes the x:\ image (not the myVeryVeryLongPath):
subst x: /d



PCL Visual Studio Configuration (another good link)


Configuration variables d’environnement pour PCL :
Après installation de l’exécutable windows, vérifier que vos variables d’environnement incluent bien les suivantes :
  • Path : C:\Program Files\PCL 1.6.0\bin;
  • PCL_ROOT : C:\Program Files\PCL 1.6.0

Configuration projet C++ dans Visual Studio 2010 pour utiliser PCL :

Clic droit sur votre projet -> Properties
Dans (Configuration Properties -> VS++ Directories -> Librairy Directories) :
  • C:\Program Files\PCL 1.6.0\lib
  • C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib
  • C:\Program Files\PCL 1.6.0\3rdParty\FLANN\lib
  • C:\Program Files\PCL 1.6.0\3rdParty\Qhull\lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8
Dans (Configuration Properties -> C/C++ -> General -> Additional Include Directories) :
  • C:/Program Files/PCL 1.6.0/3rdParty/VTK/include/vtk-5.8
  • C:/Program Files/PCL 1.6.0/include/pcl-1.6
  • C:/Program Files/PCL 1.6.0/3rdParty/Eigen/include
  • C:/Program Files/PCL 1.6.0/3rdParty/Boost/include
  • C:/Program Files/OpenNI/Include
  • C:/Program Files/PCL 1.6.0/3rdParty/FLANN/include
  • C:/Program Files/PCL 1.6.0/3rdParty/Qhull/include
Dans (Configuration Properties -> Linker -> Input-> Additional Dependencies) :
Inclure les librairies dont vous avez besoin, je vous conseille de toutes les inclures suivant votre utilisation, attention aux Debug et Release.
  • C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_system-vc100-mt-gd-1_49.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_filesystem-vc100-mt-gd-1_49.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_thread-vc100-mt-gd-1_49.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_date_time-vc100-mt-gd-1_49.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\Boost\lib\libboost_iostreams-vc100-mt-gd-1_49.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_common_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_octree_release.lib
  • C:\Program Files\OpenNI\Lib64\openNI64.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkCommon-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkRendering-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkHybrid-gd.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_io_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_io_ply_release.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\FLANN\lib\flann_cpp_s-gd.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_kdtree_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_search_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_sample_consensus_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_filters_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_segmentation_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_visualization_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_features_release.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\Qhull\lib\qhullstatic_d.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_surface_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_registration_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_keypoints_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_tracking_release.lib
  • C:\Program Files\PCL 1.6.0\lib\pcl_apps_release.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkGraphics-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkverdict-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkImaging-gd.lib
  • C:\Qt\4.8.0\lib\QtGuid4.lib
  • C:\Qt\4.8.0\lib\QtSqld4.lib
  • C:\Qt\4.8.0\lib\QtCored4.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkIO-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkFiltering-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkDICOMParser-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkNetCDF_cxx-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkmetaio-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtksys-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtksqlite-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkpng-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtktiff-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkzlib-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkjpeg-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkexpat-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkftgl-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkfreetype-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkexoIIc-gd.lib
  • C:\Program Files\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8\vtkNetCDF-gd.lib

http://www.freshcore.fr/configuration-pcl-point-cloud-library-pour-vs-2010-visual-studio-sur-windows-7/

Setting Jupyter and Tensorflow on Google Cloud Platform

https://towardsdatascience.com/running-jupyter-notebook-in-google-cloud-platform-in-15-min-61e16da34d52