darktable icon indicating copy to clipboard operation
darktable copied to clipboard

[Rotate and perspective] Add secondary action for analyze line structure button

Open paolobenve opened this issue 2 years ago • 8 comments

The rightmost button in perspective helpers section is the "analyze line structure" one. Clicking it a first time finds the lines, clicking it a second time removes the lines.

I suggest adding an intermediate action between the two actions of drawing and removing:

  • a second button click deactivates all the lines, like when a right click is made on all of them, or like when the user unselect them with shift+dragging all the photo.
  • a third click would remove all the lines, as now the second click does.

Use case:

  • I systematically adjust the perspective, and while with the photos without persons a first click on the button is enough in order to have the correct lines for using the fit button, if the photos retract persons and groups, the majority of the lines are unuseful; I must:
    • produce the lines, clicking the button
    • deactivate all the of them: annoying action; the suggested feature would make this operation just a click
    • activate the lines which are useful for the perspective

paolobenve avatar Apr 28 '22 21:04 paolobenve

@AlicVB , you recently worked on that module, how do you see this issue? do you think it's worth to work on it?

paolobenve avatar May 29 '22 18:05 paolobenve

if we want to be consistent with the image interface, I would use left-click... But we have to keep in mind that there's a drawback here : when you click on the button, it automatically select only the relevant line, and draw "unselected" the other lines. Once you will have unselected all the lines, you won't have that information anymore...

AlicVB avatar May 29 '22 20:05 AlicVB

I would use left-click

I was proposing left-click, too.

draw "unselected" the other lines

I'm seeing...

Once you will have unselected all the lines, you won't have that information anymore...

If I understand correctly, you're saying that the user looses the information of the relevant lines. But actually my proposal is a circular rotation at left click:

  • no lines drawn
  • all lines drawn, only relevant selected
  • all lines drawn, none selected
  • no lines drawn etc.

i.e., the user that needs the state that now gets can keep clicking.

Perhaps others intermediate states could be added:

  • no lines drawn
  • all lines drawn, only relevant selected
  • all lines drawn, all selected
  • all lines drawn, none selected
  • no lines drawn etc.

or

  • no lines drawn
  • all lines drawn, only relevant selected
  • all lines drawn, none selected
  • all lines drawn, all selected
  • no lines drawn etc.

or

  • no lines drawn
  • all lines drawn, none selected
  • all lines drawn, only relevant selected
  • all lines drawn, all selected
  • no lines drawn etc.

paolobenve avatar May 29 '22 23:05 paolobenve

I absolutely agree, that there are situations with lots of wrong lines (e.g. bushes, clouds, ...)

An alternative would be a way to change the size of the circle, which adds / removes the detected lines (e.g. using shift + scroll-wheel)

With a very large circle I could quickly erase all wrong lines, with a very small circle I could then precisely re-add specific correct lines.

quovadit avatar May 30 '22 06:05 quovadit

I absolutely agree, that there are situations with lots of wrong lines

yes, if the photo has persons (like most of my photos), the majority of automatic lines is useless, but some architectural line can be very useful. This is the scenario I was thinking in.

My solution has the meaning of unselecting rapidly all the lines, so that I can select immediately the 2/3 lines which make the work.

An alternative would be a way to change the size of the circle, which adds / removes the detected lines

Good! it could be another way to solve the problem. But I'd implement the 2 solutions, because with only this one could be not too easy to unselect all the wrong lines.

Another idea: I don't know how the lines are choosen as good/bad, but I'd introduce/strengthen a criterium based on length, since good lines cannot be short, and since straight lines coming from persons (which are always bad) are surely short.

paolobenve avatar May 30 '22 11:05 paolobenve

I can't test just now, but iirc, you can change the radius of the circle with mouse scroll. You can also use click+drag in order to add/remove multiple lines at the same time.

That said, imho left-click on the structure button to unselect all line can be handy (with the drawback already pointed, but if you do that, it's on purpose ;)). I prefer that to your "circular" proposal as it will be consistent with the "on-canvas" actions and won't add one click for usual workflow.

Of course we can go further and expose more "options" of the good/bad detection algo (like the line length) but I'm not sure it's worth the pain and the ui cluttering...

Edit : just tested, and you need to scroll during the mouse button press. (and it's even written in the manual !)

AlicVB avatar May 31 '22 14:05 AlicVB

you need to scroll during the mouse button press. (and it's even written in the manual !)

Thanks for the info. I'm not able to click + scroll with my touchpad, and the max-size is very limited, but shift + draw rectangle works great.

quovadit avatar Jun 02 '22 18:06 quovadit

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Aug 02 '22 00:08 github-actions[bot]

This issue was closed because it has been inactive for 300 days since being marked as stale. Please check if the newest release or nightly build has it fixed. Please, create a new issue if the issue is not fixed.

github-actions[bot] avatar May 30 '23 00:05 github-actions[bot]