For napari-ros version v1.0.0
Install miniconda (if not installed already, or have anaconda installed): https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html#installing-on-windows. Please follow the steps under "Installing on Windows".
Follow the Python install steps (using conda, under "For those familiar with Python:") at https://napari.org/stable/tutorials/fundamentals/quick_start.html#installation. Note this requires using the Anaconda Prompt.
In the same Anaconda Prompt window as the above step, make sure the conda environment "napari-env" is activated (it should say it on the left hand side in the Anaconda Prompt window). Then run
python -m pip install <path to tar.gz napari-ros file>
For example,
python -m pip install C:\Users\kyle\Desktop\napari-ros-1.0.0.tar.gz
In the same Anaconda Prompt window as the above step, run the command:
napari
The napari window should open. In the "Plugins" menu, there should be a button called "Analysis Config (napari-ros)". If you see that button, the install went OK.
Open the Anaconda Prompt window and activate the conda environment "napari-env".
conda activate napari-env
Next, in the Anaconda Prompt, cd
to the directory on where the image sequences are.
With both steps done above, the prompt should look something like:
(napari-env) C:\Users\kyle\Box\ROS_Experiments_Data_Folder\ImageSequences>
Where running the dir
command should list the folders containing the image sequence of each video.
In the same Anaconda Prompt window as before, run the command:
napari DSC_0218_Test_No_263 -w napari-ros "Analysis Config"
This will open up the napari application and load the napari-ros plugin, with the image sequence contained in the "DSC_0218_Test_No_263" folder. Wait a few seconds until all the overlays on top of the video show up.
Parameter adjustments can be made on the left hand side. Use the seek bar at the bottom of the window to skip through the video.
Note that pressing the play button next to the seek bar is really slow and is not recommended.
- This is results of the detection algorithm. The green highlight shows what the algorithm detects as fire, and the red line is the detected flame leading edge.
- This white box shows the crop area.
- Mirror the video in the analysis. Used when the flame is ignited from the right and moves towards the left.
- The crop area. The numbers represent top, bottom, left, then right respectively.
- These are the HSV thresholds. It is recommended to make small adjustments.
- Enter the amount of pixels between two markers in the video. In the layer list, click on the "DSC_0...". Now, hovering with your mouse over the video will show the coordinates in the bottom left of the window. Use this to calculate the width between two markers. The text box accepts math expressions, e.g. entering 1000-100 and hitting enter automatically enters the value 900.
- Enter the width in cm between the markers in real life. Below shows an approximate calculation of how long the plate is based on the cropping area.
- When the parameters are finalized, hit "Analyze". This will create a new folder next to the image sequence folders called "data".
Parameters settings are saved when clicking the "Analyze" button. They will be loaded next time a test is loaded, as long as you ran the napari
command in the same place.
When the parameters are finalized, hit "Analyze". This will create a new folder next to the image sequence folders called "data".
Post processing will be done automatically and results will be placed in that "data" folder.
The post processing successfully completes when the "Analyzing..." window says "done".
Analysis is done! From there the napari windows can safely be closed.
To run another test, close all the napari windows and start from step 2. Pick a different folder in the same directory of image sequence folders. The napari-ros plugin automatically loads the last parameters used (only if the next image sequence folder is right next to the previous one).