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

[ui] 2D viewer: image sequence player #1989

Merged
merged 24 commits into from
Jul 12, 2023
Merged

[ui] 2D viewer: image sequence player #1989

merged 24 commits into from
Jul 12, 2023

Conversation

mugulmd
Copy link
Contributor

@mugulmd mugulmd commented Apr 18, 2023

Description

This PR introduces a new UI element in the 2D viewer: an image sequence player.
This player allows user to navigate smoothly between viewpoints and provides playback functionnalities.

For performance and interactivity purposes, this feature relies on a newly introduces image sequence cache in QtAliceVision: alicevision/QtAliceVision#36

sequence_player

Features list

  • SequencePlayer component with :
    • slider to scroll through viewpoints
    • play/pause functionnalities
    • cached regions indicator in background
  • new pickedViewId concept in reconstruction subordinated to selectedViewId to allow only partial UI updates
  • bug fix in the float image viewer: avoid black image when a new image is being loaded

@mugulmd mugulmd self-assigned this Apr 18, 2023
@mugulmd mugulmd marked this pull request as ready for review April 25, 2023 16:49
@cbentejac cbentejac added the feature new feature (proposed as PR or issue planned by dev) label Apr 26, 2023
@mugulmd mugulmd added this to the Meshroom 2023.2.0 milestone Apr 28, 2023
@mugulmd mugulmd added the UI label Jun 15, 2023
@mugulmd mugulmd marked this pull request as draft June 19, 2023 14:52
@mugulmd mugulmd marked this pull request as ready for review July 3, 2023 13:07
return getViewpointMetadata(_reconstruction.selectedViewId);
let vp = getViewpoint(_reconstruction.selectedViewId);
let metadata = vp ? vp.childAttribute("metadata").value : "";
return JSON.parse(metadata);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly sure how it is triggered, but this line generates some SyntaxError: JSON.parse: Parse error as soon as a project is loaded, probably because the viewpoint (and thus the metadata) is not yet available at that point.

target: _reconstruction
function onSelectedViewIdChanged() {
for (let idx = 0; idx < sortedViewIds.length; idx++) {
if (_reconstruction.selectedViewId == sortedViewIds[idx] && (m.frame != idx)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think type coercion could be applied here:

Suggested change
if (_reconstruction.selectedViewId == sortedViewIds[idx] && (m.frame != idx)) {
if (_reconstruction.selectedViewId === sortedViewIds[idx] && (m.frame != idx)) {

@cbentejac cbentejac merged commit e0a3944 into develop Jul 12, 2023
2 checks passed
@cbentejac cbentejac deleted the mug/sequencePlayer branch July 12, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature (proposed as PR or issue planned by dev) UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants