Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation update #69

Merged
merged 10 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
*.swp
__pycache__/
*.jpg
parallax/*.png
*.log
*.npy
Expand Down
92 changes: 0 additions & 92 deletions docs/ReadMe.rst

This file was deleted.

33 changes: 0 additions & 33 deletions docs/conf.py

This file was deleted.

3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Sphinx
sphinx-jinja
furo
furo
docutils
135 changes: 135 additions & 0 deletions docs/source/FAQ.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
FAQs
================

.. _reticle_detection_faqs:

Reticle Detection
------------------------

.. _faq_r_0:

- **Q. How should the reticle look in the view?**

Here are some examples of how the reticle should look in the view:

.. image:: _static/reticleDetection.jpg
:scale: 20%

- **Centered and in focus:** The reticle should be well-centered in the view, with its center in clear focus.

- **Properly illuminated:** The reticle should be evenly lit without any harsh reflections or shadow regions.

- **Appropriate size:** The reticle should occupy a significant portion of the view, avoiding being too small or too large.

- **Clear and unobstructed:** The reticle surface should be clean, free of debris, dirt, or any obstructions, including probes, that could interfere with detection.

- **Consistent background:** The background should be plain and consistent, without any patterns or irregularities that might affect detection.

.. _faq_r_1:

- **Q. Reticle is not detected. What should I do?**

Possible Reasons and Solutions:

1. Brightness is too high or too low:

.. image:: _static/r_problem1.jpg
:scale: 20%

- Solution: Adjust the brightness to the optimal level.

.. image:: _static/r_problem2.jpg
:scale: 20%

2. Reticle is out of focus:

.. image:: _static/r_problem4.jpg
:scale: 20%

- Solution: Close up the camera view to the center of the reticle so that the center of the reticle is in focus.

3. Reticle view is too small:

- Solution: Zoom in the camera view so that the reticle view is larger.

4. Only partial reticle is visible:

.. image:: _static/r_problem5.jpg
:scale: 20%

- Solution: Ensure the reticle is well-centered in the view.

5. Inconsistent lighting such as light reflection or shadow regions:

.. image:: _static/r_problem13.jpg
:scale: 20%

.. image:: _static/r_problem11.jpg
:scale: 20%

- Solution: Make sure the reticle background has consistent lighting.

6. Occlusion of reticle due to dirt or debris:

.. image:: _static/r_problem9.jpg
:scale: 20%

- Solution: Clean the reticle surface to remove any debris or dirt.

7. Inconsistent background images:

- Solution: Avoid attaching paper tapes or creating patterns on the background. Attaching regular paper to the back of the reticle is recommended.

8. Too dark reticle background:

.. image:: _static/r_problem12.jpg
:scale: 20%

- Solution: Use a white paper as a background to increase the contrast between the reticle and the background.


.. _faq_r_2:

- **Q. Reprojection error is too high. How to fix it?**

Possible Reasons and Solutions:

1. Debris or dirt on the reticle surface causing misalignment:

- Solution: Clean the reticle surface to remove any debris or dirt, which the algorithm may mistakenly identify as part of the reticle.

2. View is too far from the reticle, making it appear too small:

- Solution: Move the camera closer to the reticle to ensure it occupies a larger portion of the view.

3. Reticle view is too skewed, causing a small in-focus region:

- Solution: Adjust the camera position so that the view is less skewed, and the face of the reticle appears as flat as possible.


.. _general_faqs:

General Interface
------------------------

.. _faq_g_1:

- **Q. If I turn on Parallax, it shows noisy data on the view and does not display the camera view. What should I do?**

Parallax is currently under development, and some functions are not stable. If camera resources are not cleared up in the previous session, such as when the app exits forcefully or the camera interface is unplugged, it can cause this issue.

.. image:: _static/reset1.jpg
:scale: 20%

- Solution: Use Spinview to reset the camera resources. Steps to reset the camera resources:

1. Turn off Parallax.
2. Open Spinview and start and stop streaming on all cameras to reset the camera resources.

.. image:: _static/reset2.jpg
:scale: 30%

.. image:: _static/reset3.jpg
:scale: 30%

3. Turn on Parallax again.
100 changes: 100 additions & 0 deletions docs/source/ReadMe.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Getting Started
====================

Prerequisites
--------------
- **Python~=3.8**
- Recommended to install via `Anaconda`_ or `Miniconda`_
- Python 3.8 is required for the Spinnaker library.
- `Pathfinder MPM Software`_ version 2.8.0 or later
- `Spinnaker SDK`_ (Recommended)
- PySpin (for Linux or Mac OS users)

.. _Anaconda: https://www.anaconda.com/products/individual
.. _Miniconda: https://docs.conda.io/en/latest/miniconda.html
.. _Pathfinder MPM Software: https://www.newscaletech.com/multi-probe-micromanipulator/mpm-system-pathfinder-software/
.. _Spinnaker SDK: https://www.flir.com/products/spinnaker-sdk/?vertical=machine+vision&segment=iis

Installing and Upgrading
-------------------------
**1. Create a virtual environment using Python 3.8 and activate it:**
- On Windows:

.. code-block:: bash

python -m venv venv
./venv/Scripts/activate

- On Linux/Mac:

.. code-block:: bash

python -m venv venv
source venv/bin/activate

**2. Install the latest version:**
.. code-block:: bash

pip install parallax-app

To upgrade to the latest version:

.. code-block:: bash

pip install parallax-app --upgrade

**3. To install the camera interface:**
.. code-block:: bash

pip install parallax-app[camera]

Running Parallax
----------------
1. **Run the Pathfinder MPM Software application** to connect to the manipulator:

- Run Pathfinder MPM Software (v2.8.0 or later) in administrator mode.
- Enable the HTTP server.
- Version 2.8.0 of the Pathfinder MPM software includes an HTTP listener that can send probe information to a client program.
- Enable the HTTP server in the "MPM System Setup" dialog.
- Click the "Enable HTTP Server" checkbox to turn on the service.

.. image:: _static/PathfinderHTTPServer.jpg
:alt: Enable HTTP server
:scale: 30%

2. **Run the Parallax application:**

.. code-block:: bash

python -m parallax


Other Things to Note
---------------------
**Development Mode**

1. Clone the repository:

.. code-block:: bash

git clone https://github.com/AllenNeuralDynamics/parallax.git

2. Install dependencies:

.. code-block:: bash

pip install -e .[dev]

**Documentation**

1. Install dependencies:

.. code-block:: bash

pip install -e .[docs]

2. Create the documentation HTML files:

.. code-block:: bash

sphinx-build -b html docs/source docs/_build
Binary file added docs/source/_static/PathfinderHTTPServer.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.red {
color: red;
}
.yellow {
color: yellow;
}
.blue {
color: blue;
}
Loading
Loading