Commit graph

151 commits

Author SHA1 Message Date
Fabien Castan
1fc2b228af
Merge pull request #1896 from alicevision/fix/dragDropImages
[ui] Drag&Drop: Use a pool of threads for asynchronous intrinsics computations
2023-02-14 21:23:27 +01:00
Candice Bentéjac
246843a769 [ui] Reconstruction: Use a ThreadPool for asynchronous computations
When importing images, the intrinsics were (re)built asynchronously in
a thread that was not attached to anything. The update of the intrinsics,
performed in the main thread following a signal emitted in the detached
thread, would block when there were already some existing intrinsics
because the garbage collector would destroy the thread in which the
new intrinsics had been computed while the update was ongoing.

This commit adds a ThreadPool to the Reconstruction object, and uses it
to perform the intrinsics computations asynchronously. The update of the
intrinsics thus does not remain blocked and images can be imported safely,
either though the "Import Images" menu or through drag & drop.

The "Update Intrinsics" button, which appears when the dialog to edit the
sensor database is on display, also uses the ThreadPool to recompute the
intrinsics when requested.

The "runAsync" method, which spawned a thread without attaching it to
anything, is removed. The "importImagesAsync" method, whose only goal
was to call "runAsync" on "importImagesSync", is also removed. Instead,
the pool of threads is directly used to call "importImagesSync"
asynchronously.
2023-02-14 17:26:36 +01:00
Candice Bentéjac
b5fab79e09 [ui] Import images asynchronously with the "Import Images" menu action
Loading images with the "Import Images" menu action is a blocking
operation that might freeze the app if there are many images to import.

This commit performs the import asynchronously (similarly to what is done
when images are dropped in the Image Gallery): Meshroom remains unusable
while the images are imported and the intrinsics built (which is a wanted
behaviour), but it does not freeze at all.
2023-02-14 17:23:29 +01:00
mugulmd
a52aeabedb [ui] 3D viewer: correct field of view using orientation tag 2023-02-06 08:37:30 -08:00
mugulmd
205ff22b74 [ui] apply orientation tag to 3d scene to match 2d viewer 2023-02-06 06:09:37 -08:00
mugulmd
21f43075f0 [ui] fix transform used for camera in 3D viewer 2023-02-01 09:22:18 -08:00
Candice Bentéjac
8bef398bed Remove workarounds and backports for Python 2 support
In particular:
- In common/, remove the backport of weakref.WeakMethod
- In docs/ and ui/, use the standard FileNotFoundError class
- Use built-in open() instead of io.open(), and stop importing io
- In core/stats.py, use the standard implementation of xml.etree instead
of the C one
2022-12-05 17:16:21 +01:00
Candice Bentéjac
635f85e7fd Remove all references to pyCompatibility
- "pyCompatibility.basestring" are replaced by standard Python3 "str"
- "Sequence" and "Iterable" from "collections" are now directly imported
with "collections.abc"
2022-12-05 17:16:21 +01:00
Candice Bentéjac
eac43c84c3 [submitters] Add an option to update the job title on submitters 2022-12-05 15:23:10 +01:00
Loïc Vital
426cdbe50b [ui] use tempCameraInit node to get viewpoints when it exists 2022-10-19 09:50:24 +01:00
Candice Bentéjac
9c41ce2401 [ui] ImageGallery: update group index when CameraInit node is double-clicked
If a node of type "CameraInit" is double-clicked in the Graph Editor,
the Image Gallery group index will immediately be updated to display
the corresponding node's information.
2022-09-02 19:19:28 +02:00
Fabien Castan
25cb8f80d8
Merge branch 'develop' into fix-pyside2-decorator-bug 2022-07-28 10:31:01 +02:00
Fabien Castan
b291a9ed07
Merge pull request #1727 from alicevision/dev/externalPipelines
Use project files to define pipelines
2022-07-26 15:06:16 +02:00
Candice Bentéjac
f2a904ac9b Fix compatibility with Python 3
- Import "collections" correctly depending on the version of
Python
- Fix regex that raised deprecation warnings in Python 3
2022-07-19 14:52:18 +02:00
Candice Bentéjac
8fb0c778d1 Add support for external pipelines using project files
- Support loading external pipelines as templates with project files
- Add template files for some standard pipelines
- Remove the hard-coded generation of new pipelines
- Update multiviewPipeline test: the multiviewPipeline test relied on the hard-coded generation of
pipelines.
2022-07-12 14:56:24 +02:00
Povilas Kanapickas
e725f599c5 [ui] Work around PySide2 bug affecting property decorators
PySide 5.15.1 and newer have a bug
(https://bugreports.qt.io/browse/PYSIDE-1426) which results in the
following error emitted on certain @Property decorators:

TypeError: A constant property cannot have a WRITE method or a NOTIFY
signal.

Until the bug is fixed on PySide2 side workaround is to not use Property
as a decorator, but as a simple function wrapper emitting the property
as a class member.

Fixes #1239.
2022-07-08 01:00:43 +03:00
Fabien Castan
7b467b649d fix: force float conversion 2022-06-02 14:15:18 +02:00
fabien servant
655dad9959 [camerainit] update parameters to use focal in mm 2022-03-25 11:07:52 +01:00
Fabien Castan
cd15a92318
[ui] fix uvCenterOffset
Fix changes of principal point coord system from https://github.com/alicevision/meshroom/pull/1509.
2021-10-14 14:32:00 +02:00
Nils Landrodie
3fad2faa87 [multi] Add new active node category and pass id view to disto viewer 2021-09-14 18:07:33 +02:00
Remy Mellet
d30571ce7d Draft Reconstruction pipeline 2021-09-13 10:36:46 +02:00
Fabien
cc99906dae [sfm] dirty quick fix for anamorphic pxFocalLength 2021-05-28 15:53:24 +02:00
Fabien Castan
1999b7c5b2 [multiview] New pipeline Photogrammetry and Camera Tracking 2021-05-27 17:02:39 +02:00
Fabien Castan
cbdad2d7e6
Merge pull request #1379 from alicevision/dev/cameraTrackingPipeline
New experimental camera tracking pipeline
2021-05-03 12:04:04 +02:00
Fabien Castan
a17fdf33b5 [ui] reconstruction: remove dead code 2021-04-21 22:03:05 +02:00
Fabien Castan
b2bb1e12c2 [ui] reconstruction: minor rename
_setSelectedViewpoint does not emit a signal, so it should be a private
function.
2021-04-21 22:00:49 +02:00
ludchieng
b1e42e0f39 Add ColorCheckerDetection pipeline 2021-04-21 19:00:22 +02:00
Fabien Castan
0ddda9f982 [multiview] new experimental pipeline for camera tracking 2021-04-16 10:45:57 +02:00
Fabien Castan
d9018ffce6 [ui] PanoramaInit: set init mode to File on xml file drop 2021-01-22 15:21:22 +01:00
Fabien Castan
37d3008f9e [core] rename nodesOfType 2021-01-22 13:12:29 +01:00
Fabien Castan
1102ce84e0 Merge branch 'develop' of github.com:alicevision/meshroom into dev/nodesAndTaskManager
Conflicts:
	meshroom/core/graph.py
	meshroom/ui/qml/main.qml
2020-12-01 20:02:43 +01:00
ChemicalXandco
68b9057619 fix error on live reconstruction 2020-11-11 16:58:11 +00:00
Fabien Castan
589856ecdc Rename hdri into panoramaHdr 2020-09-05 01:16:51 +02:00
Julien-Haudegond
b567d8ff5c [core] Graph: change default reverse direction in dfsOnDiscover() 2020-09-04 12:42:05 +02:00
Julien-Haudegond
208749d897 [core] Graph: change signature of dfsOnDiscover() 2020-09-04 12:22:20 +02:00
Julien-Haudegond
f8bd40ad38 [core] Graph: rename nodesFromNode() to dfsOnDiscover() 2020-09-04 11:49:45 +02:00
Julien-Haudegond
e0389ad957 [ui] move UndoStack and TaskManager instantiations into app.py 2020-08-31 17:43:17 +02:00
Julien-Haudegond
8020cf5158 [ui] Reconstruction: add clear methods 2020-08-17 11:43:33 +02:00
Fabien Castan
c173caf39d [ui] fix border case with scene compability
The metadata is in an invalid state and the value is of type Property
instead of type String
2020-07-29 17:10:20 +02:00
Fabien Castan
cfc07fde2f [ui] set the variable not the property 2020-07-29 17:04:20 +02:00
Fabien Castan
d941f61403 [ui] fix border case: no node 2020-07-29 17:03:40 +02:00
Fabien Castan
e0b8bc3691 [ui] python-3 compatibility 2020-07-13 10:36:51 +02:00
Fabien Castan
b439bf638e [ui] CompatibilityNodes cannot be active nodes 2020-07-13 10:36:01 +02:00
Fabien Castan
4717d73e6f [ui] fix type error with Qt Property 2020-07-10 13:02:15 +02:00
Fabien Castan
049122effe [nodes] PanoramaInit: update output param name 2020-07-09 16:21:13 +02:00
Fabien Castan
93e5a02cd7 [ui] declare slot to avoid type errors with the property using it 2020-07-09 14:10:23 +02:00
Fabien Castan
ec67c772fa [ui] new generic way to manage "active" nodes per node type 2020-07-07 22:05:53 +02:00
Fabien Castan
ea5b639245 [ui] minor fix when viewpoints is None 2020-07-07 11:35:40 +02:00
Fabien Castan
a239005901 Update from LDRToHDR node to LdrToHdrMerge node 2020-07-05 23:08:57 +02:00
Fabien Castan
588e9fd335 [ui] Reconstruction: fix for python-2 compatibility 2020-07-02 11:28:54 +02:00