Difference between revisions of "Addon:Photo Tagging Gramplet"

From Gramps
Jump to: navigation, search
m (Toolbar)
m (Selection area: Drag;n;drop)
(46 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Image:Photo_Tagging_view.jpg|500px|thumb|right]]
+
{{Third-party plugin}}
  
== What is Photo Tagging Gramplet ==
+
[[File:Photo-Tagging-example-51.png|500px|thumb|right|The Gramplet window consists of the toolbar, the selection area (center-left) and the list of tagged people (center-right).]]
  
'''Photo Tagging Gramplet''' facilitates tagging people in photographs, i.e. associating regions of images with Gramps persons.
+
The {{man label|Photo Tagging Gramplet}} facilitates tagging people in photographs, i.e. associating regions of images with Gramps persons.
  
 
== Features ==
 
== Features ==
Line 10: Line 10:
 
* List of persons tagged in the current photograph
 
* List of persons tagged in the current photograph
 
* Adding and modifying regions and associations
 
* Adding and modifying regions and associations
* Detecting faces automatically
+
* Optionally detect faces in photo automatically.[[Photo_Tagging_Gramplet#Installation_Prerequisites|*]]
  
== Installation ==
+
== Usage ==
  
The Photo Tagging gramplet can be installed from within Gramps. Go to {{man menu|Edit -> Preferences}} and click the {{man button|Check now}} button to see a list of plugins which are not installed on your computer.
+
Select the {{man label|Media}} Category View and from the Sidebar add the {{man label|Photo Tagging Gramplet}}.
+
 
Automatic detection of faces requires the following to be installed:
+
The Gramplet window consists of:
* OpenCV, its dependencies and Python bindings. This library should be available in common Linux distributions. For example, Debian package python-opencv provides the Python bindings for the library. It will require the core library packages (libopencv-*), as well as python-numpy package, to be installed. If OpenCV is not found, the automatic detection feature will be unavailable, but the gramplet should otherwise function correctly.
+
* the [[Photo_Tagging_Gramplet#Toolbar|toolbar]]
 +
* the [[Photo_Tagging_Gramplet#Selection_area|selection area]]
 +
* the [[Photo_Tagging_Gramplet#List_of_tagged_people|list of people tagged]] in the image
 +
 
 +
=== Selection area ===
 +
 
 +
The selection area displays the image and highlights the regions that have been associated with person in the Gramps database.
 +
 
 +
The mouse wheel can be used to zoom in and out of the image. Alternatively, you can use the corresponding toolbar buttons.
 +
 
 +
Left click inside of one the regions makes this region active. Right-click causes the context menu to be displayed.
 +
 
 +
To tag a person, select a region of the image by pressing the left mouse button in one of its corners and dragging the pointer across the desired area. A rectangular frame will mark the selected region. Use the toolbar to select an existing person or add a new person to be associated with the region.
 +
 
 +
{{man tip|Drag'n'Drop as an alternative to the Person Selection dialog|The most obvious option for selecting a Person for a tag is the Person Selection Dialog.  But you can use [https://wikipedia.org/wiki/Drag_and_drop Drag'n'Drop] as an alternative and more efficient method.<br />Drag a Person from the Clipboard to drop on the selected row in the Gramplet to complete a Tag. Or, detach ([[Gramps_{{man version}}_Wiki_Manual_-_Gramplets#The_split-screen_Sidebar_.26_Bottombar|undock]]) the Photo Tagging Gramplet and use the Relationship View to tag multiple members from a Family group.  Or use filtering in the People View to select from a subset of the family tree.<br /><br />It is important to select the target row '''''before''''' beginning any drag.}}
 +
 
 +
To modify a region, first make it active by clicking inside the region. Move the mouse pointer to one of the borders or corners of the selection box. A grabbing handle will appear that you can drag to modify the shape of the box.  
  
== Usage ==
+
To change the person associated with the region, use the toolbar buttons or the context menu.
  
The gramplet window consists of:
+
To associate a region with a different person, click within the region and use the toolbar buttons to select or add a person. In this case, the previous association is discarded.
* the toolbar
 
* the selection area
 
* the list of people tagged in the image
 
  
 
=== Toolbar ===
 
=== Toolbar ===
  
[[Image:toolbar.gif|The toolbar.]]
+
The toolbar contains nine buttons that are made active in accordance with the current state of selection.
 +
 
 +
[[Image:toolbar.gif|The Gramplet toolbar (the exact appearance can depend on the operating system and the version of the GTK library used).]]
 +
 
 +
Use the toolbar to modify the associations of the current image.
 +
 
 +
[[File:Select.gif]] Displays the Gramps 'Select Person' dialog. Once selection is made, the person is tagged in the current box.
 +
 
 +
[[File:New.gif]] Creates a new person and displays the Gramps 'Person' dialog.
  
To tag a person, select a region of the image by pressing the left mouse button in one of its corners and dragging the pointer across the desired area. A rectangular frame will mark the selected area. Use the toolbar to select an existing person or add a new person to be associated with the region.
+
[[File:Clear.gif]] Removes the tag from the current box.
  
To modify a region, press the left mouse button over one of the corners and drag it to its new position.
+
[[File:Remove.gif]] Removes the current box together with the tag.
  
To associate a region with a different person, click within the region and use the toolbar buttons to select or add a person. In this case, the previous association is discarded.
+
[[File:Edit.gif]] Displays the Gramps 'Person' dialog for the person tagged in the current box.
 +
 
 +
[[File:Zoomin.gif]] Zooms the image in.
 +
 
 +
[[File:Zoomout.gif]] Zooms the image out.
 +
 
 +
[[File:Detect.gif]] Runs the face detection algorithm. (Only if the [[Photo_Tagging_Gramplet#Installation_Prerequisites|optional prerequisites]] have been installed)
 +
 
 +
[[File:Settings.gif]] Displays the Gramplet [[Photo_Tagging_Gramplet#Settings|settings]] dialog.
 +
 
 +
=== List of tagged people ===
 +
 
 +
The list contains the people tagged in the current image, as well as the selection boxes that have not yet been associated with a particular person. A thumbnail image of the corresponding region of the image is displayed in every row.
 +
 
 +
Left-click on a row in the list selects the corresponding region in the image. Further manipulations can be done.
 +
 
 +
Double-click on a row with a person opens the Gramps 'Person' dialog for this person. This is equivalent to pressing the 'Edit' button in the Gramplet toolbar.
 +
 
 +
===Settings===
 +
 
 +
* {{man label|Selection}} tab
 +
** {{checkbox|0}} {{man label|Replace existing references to the person being assigned without asking}} (checkbox unchecked by default)
 +
* {{man label|Face detection}} tab
 +
** {{man label|Minimum face width}} (<code>50</code> default) Size in pixels
 +
** {{man label|Minimum face width}} (<code>50</code> default) Size in pixels
 +
*** {{checkbox|0}} {{man label|Detect faces inside existing boxes}} (checkbox unchecked by default)
 +
 
 +
== Installation Prerequisites ==
 +
 
 +
{{man menu|If the OpenCV is not found, the automatic face detection feature will be unavailable}}, but the Gramplet should otherwise function correctly.
 +
 
 +
Automatic detection of faces requires the following to be installed:
 +
* [https://opencv.org/releases/ OpenCV], its dependencies and Python bindings. This library should be available in common Linux distributions. For example, Debian package python-opencv provides the Python bindings for the library. It will require the core library packages (libopencv-*) and the
 +
* [https://numpy.org/ python-numpy] package.
 +
 
 +
==Issues==
 +
* {{bug|10913}} Face detection does NOT work in the[Microsoft Windows] AIO bundle(s). As near as I can tell, the required cv2 (OpenCV) and numpy prerequisites would approximately triple the size of the AIO download and installation. So they are not included.  
  
== To do ==
+
=== Feature request ===
* Good manual on this page
+
Some of the ideas to be implemented in future versions of the Gramplet:
 
* Detection of faces across multiple images
 
* Detection of faces across multiple images
* Integrate with Picasa
+
* Integrate with Picasa {{bug|5674#c31715}}
 +
* Redirect help button here.
 +
 
 +
Initial announcement:
 +
* [https://sourceforge.net/p/gramps/mailman/message/27752124/ Face-Detection-Gramplet] - 2011
 +
** The Face-Detection-Gramplet [https://github.com/gramps-project/addons-source/tree/master/FaceDetection] was redeveloped into this Gramplet. <!-- Pixbuf has no render_pixmap_and_mask method. ([http://code.opencv.org/issues/2811 No python3 bindings for opencv till opencv version3.0] / ([http://opencv.org/opencv-3-0-alpha.html|For testing OpenCV 3.0 beta(2014-11-11)has python 3 bindings] -->
  
 
[[Category:Plugins]]
 
[[Category:Plugins]]
 
[[Category:Developers/General]]
 
[[Category:Developers/General]]
 
[[Category:Gramplets]]
 
[[Category:Gramplets]]
 +
[[Category:Media]]

Revision as of 18:27, 9 October 2021

Gramps-notes.png

Please use carefully on data that is backed up, and help make it better by reporting any comments or problems to the author, or issues to the bug tracker
Unless otherwise stated on this page, you can download this addon by following these instructions.
Please note that some Addons have prerequisites that need to be installed before they can be used.
This Addon/Plugin system is controlled by the Plugin Manager.


The Gramplet window consists of the toolbar, the selection area (center-left) and the list of tagged people (center-right).

The Photo Tagging Gramplet facilitates tagging people in photographs, i.e. associating regions of images with Gramps persons.

Features

  • Image preview with scrolling and zooming
  • List of persons tagged in the current photograph
  • Adding and modifying regions and associations
  • Optionally detect faces in photo automatically.*

Usage

Select the Media Category View and from the Sidebar add the Photo Tagging Gramplet.

The Gramplet window consists of:

Selection area

The selection area displays the image and highlights the regions that have been associated with person in the Gramps database.

The mouse wheel can be used to zoom in and out of the image. Alternatively, you can use the corresponding toolbar buttons.

Left click inside of one the regions makes this region active. Right-click causes the context menu to be displayed.

To tag a person, select a region of the image by pressing the left mouse button in one of its corners and dragging the pointer across the desired area. A rectangular frame will mark the selected region. Use the toolbar to select an existing person or add a new person to be associated with the region.

Tango-Dialog-information.png
Drag'n'Drop as an alternative to the Person Selection dialog

The most obvious option for selecting a Person for a tag is the Person Selection Dialog. But you can use Drag'n'Drop as an alternative and more efficient method.
Drag a Person from the Clipboard to drop on the selected row in the Gramplet to complete a Tag. Or, detach (undock) the Photo Tagging Gramplet and use the Relationship View to tag multiple members from a Family group. Or use filtering in the People View to select from a subset of the family tree.

It is important to select the target row before beginning any drag.


To modify a region, first make it active by clicking inside the region. Move the mouse pointer to one of the borders or corners of the selection box. A grabbing handle will appear that you can drag to modify the shape of the box.

To change the person associated with the region, use the toolbar buttons or the context menu.

To associate a region with a different person, click within the region and use the toolbar buttons to select or add a person. In this case, the previous association is discarded.

Toolbar

The toolbar contains nine buttons that are made active in accordance with the current state of selection.

The Gramplet toolbar (the exact appearance can depend on the operating system and the version of the GTK library used).

Use the toolbar to modify the associations of the current image.

Photo-Tagging-Select-icon.gif Displays the Gramps 'Select Person' dialog. Once selection is made, the person is tagged in the current box.

Photo-Tagging-New-icon.gif Creates a new person and displays the Gramps 'Person' dialog.

Photo-Tagging-Clear-icon.gif Removes the tag from the current box.

Photo-Tagging-Remove-icon.gif Removes the current box together with the tag.

Photo-Tagging-Edit-icon.gif Displays the Gramps 'Person' dialog for the person tagged in the current box.

Photo-Tagging-Zoomin-icon.gif Zooms the image in.

Photo-Tagging-Zoomout-icon.gif Zooms the image out.

Photo-Tagging-Detect-icon.gif Runs the face detection algorithm. (Only if the optional prerequisites have been installed)

Photo-Tagging-Settings-icon.gif Displays the Gramplet settings dialog.

List of tagged people

The list contains the people tagged in the current image, as well as the selection boxes that have not yet been associated with a particular person. A thumbnail image of the corresponding region of the image is displayed in every row.

Left-click on a row in the list selects the corresponding region in the image. Further manipulations can be done.

Double-click on a row with a person opens the Gramps 'Person' dialog for this person. This is equivalent to pressing the 'Edit' button in the Gramplet toolbar.

Settings

  • Selection tab
    • Replace existing references to the person being assigned without asking (checkbox unchecked by default)
  • Face detection tab
    • Minimum face width (50 default) Size in pixels
    • Minimum face width (50 default) Size in pixels
      • Detect faces inside existing boxes (checkbox unchecked by default)

Installation Prerequisites

If the OpenCV is not found, the automatic face detection feature will be unavailable, but the Gramplet should otherwise function correctly.

Automatic detection of faces requires the following to be installed:

  • OpenCV, its dependencies and Python bindings. This library should be available in common Linux distributions. For example, Debian package python-opencv provides the Python bindings for the library. It will require the core library packages (libopencv-*) and the
  • python-numpy package.

Issues

  • 10913 Face detection does NOT work in the[Microsoft Windows] AIO bundle(s). As near as I can tell, the required cv2 (OpenCV) and numpy prerequisites would approximately triple the size of the AIO download and installation. So they are not included.

Feature request

Some of the ideas to be implemented in future versions of the Gramplet:

  • Detection of faces across multiple images
  • Integrate with Picasa 5674#c31715
  • Redirect help button here.

Initial announcement: