User Tools

Site Tools


Field Manual: Extracting spot patterns

Wildbook for Whale Sharks is a capture-mark-recapture (CMR) framework for storing and analyzing whale shark data. Among its many features, it supports spot pattern searches to help identify new and previously sighted individual whale sharks using photographs and frame grabs from video.

Basic assumptions

1. For each encounter submitted to the Library, spot patterns can be added for the left and/or right sides if one or both sides have been appropriately photographed. Ideal photographs are taken perpendicular to the spot pattern area, as defined and demonstrated in the red box below.

Figure 1. The area used for spot pattern extraction on the left and right sides is highlighted in red. This photo represents an ideal photograph taken perpendicular to the spot pattern area.

2. To prevent the double-counting of two separate encounters of the same shark as two separate animals (e.g. one encounter submitted with only a left side photo and a second encounter submitted with only a right side photo) only encounters with left side spot patterns that have been extracted and added to the Library can be allocated as new sharks. If they cannot be visually matched to another shark in the Library by other features (scars, etc.), encounters for which only right side spot data can be extracted, must remain “Unassigned” until they can be matched to another shark in the Library.

3. Once an encounter has been assigned to a shark, new spot data cannot be added to it. This prevents the overwriting of existing spot data which was used to identify the encounter previously. To add spot data to an encounter that has been assigned to a shark, the encounter must first become “Unassigned” by removing it from the shark.

Pre-processing a Photo for Pattern Recognition

Any encounter that is not assigned to a shark can have left and/or right side spot data added to it if properly oriented photos were submitted for it. Here are the steps required to extract a pattern from a photo. Let’s use the following photo as a good example.

Figure 2. A new photograph submitted to Wildbook for Whale Sharks.

To ensure that a photograph is properly aligned for spot pattern recognition analysis using either the I3S or Modified Groth algorithms supported by Wild Me, it must first be pre-processed in a graphics package. There are a variety of free, inexpensive, and expensive software packages that you can use for the following steps. Wild Me uses Adobe Fireworks for simple photo processing or Paint.NET, which is freely available. Other applications, such as Adobe Photoshop and GIMP can also be used. The directions for using your choice of graphics packages will vary. The objective is to obtain a final image of the shark that is correctly-oriented as described in the following sections.

Obtaining a source image from Wildbook for Whale Sharks

1. Login to the Library through a web browser if you have not done so already. 2. In the Library, go to the encounter to which you want to add spot data. 3. In the encounter page, click on the photograph from which you want to extract spot data. 4. Click on the link “Click here to access the original source image.”

Figure 3. Viewing an image and accessing the source file in Wildbook for Whale Sharks.

5. When the original image appears in your browser, right-click the image and select Save Picture As to save the picture to your Desktop.

Pre-processing an image in Paint.NET

If you choose to use Paint.NET to pre-process source images on Windows XP/Vista, use the following instructions. If you use another software program, replicate these basic steps using your tool.

1. Open Paint.NET on your computer. 2. Open the picture in Paint.NET by selecting Open from the File menu.

Figure 4. A whale shark image loaded in Paint.NET.

3. Use the Rectangle Select tool to select the spot pattern area used for whale sharks.
Figure 5. Selecting the spot pattern area in Paint.NET.

4. From the Image menu, select Crop to Selection to reduce the image to only the needed patterning area.
Figure 6. A cropped spot pattern area.

5. We also recommend reducing the size of very large images to ensure the spot pattern area fits neatly onto the Paint.NET canvas at 100% magnification. To adjust image size, use the Rectangle Select tool to select the entire image and then select Resize from the Image menu. Adjust image size appropriately.

6. After obtaining a reduced image of only the spot pattern area, create a new layer to hold a horizontal adjustment line using the Add New Layer button of the Layers pallet.

Figure 7. Adding a new layer to hold a reference line.

7. With the new layer selected in the Layers palette, add a horizontal reference line to the image using the Line\Curve tool . Hold the Shift key when drawing the reference line to ensure it is perfectly horizontal.

Figure 8. Adding a horizontal reference line.

8. Select the Background layer containing the cropped spot patterning area and then use the Rectangle Select tool to select the entire patterning area image. From the Layers menu, select Rotate/Zoom.

Figure 9. Accessing the Rotate tool.

9. Use the Rotate and Pan controls of the Rotate/Zoom dialog box to rotate and move the spot patterning area until the vertebral column is flat against the horizontal line. Click OK when you are done.

Figure 10. Obtaining a proper orientation for the spot patterning area.

Note: The section of the vertebral column just above the fifth gill may curve downward slightly and not fit flush to the line. This is acceptable so long as the rest of the vertebral column above the pectoral fin is parallel to the line.

10. Select the layer with the horizontal red line in the Layers pallet and click the Delete Layer button to remove it.

11. Use the Rectangle Select tool and the Image, Crop to Selection menu command to reduce you image to only the needed spot patterning area.

12. Choose File, Save As to save your completed processed image under a new name.

Figure 11. An image ready for spot pattern extraction.

You are now ready to extract the spots using Wild Me Interconnect and send them to Wildbook for Whale Sharks.


The following video demonstrates these instructions.

Sending a pattern to Wildbook for Whale Sharks with the Wild Me Interconnect Client

The Wild Me Interconnect Client is a small standalone software application that analyzes the image you prepared above and sends spot data to Wildbook for Whale Sharks where it can be used with the I3S and modified Groth algorithms to identify potential matches.

Note: To use Interconnect for the first time, you will need to download it and configure your computer to run it. See Client Software for information on how to obtain and install the free Interconnect client.

To extract a spot pattern and send it to Wildbook for Whale Sharks:

1. Open the Wild Me Interconnect Client.

2. From the File menu, select Open left-side shark image.

Figure 12. Opening a new image in Wild Me Interconnect.

3. In the Open dialog box, select the pre-processed image file and then click Open.

Note: Only JPG and GIF images are usable at this time in Interconnect.

4. After the image appears in Interconnect, from the File menu select Spot Selection.

Figure 13. Starting spot selection in Wild Me Interconnect.

5. Select the three reference points needed for the I3S algorithm (the Modified Groth algorithm does not require these) by left-clicking on the appropriate locations in the image. The red text overlaying the image will prompt you. The order of spots is:

  • Top of the 5th gill
  • Posterior point of the pectoral fin on the flank. If the fin is not horizontal, select the point above it where the white countershading underneath meets the pigmented skin along the flank.
  • Bottom of the 5th gill

To unselect any reference point, right-click it.

Figure 14. Selecting the three reference points needed for the I3S pattern recognition algorithm.

6. Left-click in the image to select the center points of all of the spots in region of interest. To unselect any spot, right-click it.

Figure 15. Selecting spots for computer-assisted photo-identification.

6. After you have selected all of your spots, from the Database menu, click Submit to Wildbook for Whale Sharks to send the spot data via the Internet to Wildbook for Whale Sharks. You will need an open Internet connection to perform this step.

Note: Once an encounter is allocated to a shark in the Library, new spot data cannot be submitted for it unless it is removed from the shark to which it belongs. This limitation is designed to preserve spot data used to justify a match and to protect that spot data from accidental overwriting. If you are attempting to add spots to an encounter already assigned to a shark, you must first remove the encounter from the shark to add the spots.

7. In the Send a left\right- side pattern to Wildbook for Whale Sharks dialog box, enter the encounter number in Wildbook for Whale Sharks to assign the pattern to. Click OK when you are ready to send the pattern.

Figure 16. Entering the encounter number to assign the extracted spot pattern to.

8. A new browser window will open to confirm that your spots have been received and prompting you to send in your processed image generated in steps 1-16 above. You may also be prompted to login first.

Figure 17. Uploading the processed image.

9. Browse, select, and submit the processed image in your browser.

10. Your image is now visible (when you are logged in) in the web page for the encounter.

11. Confirm that the appropriate spots have been extracted and mapped using the visual remapping capability in the Library. In the encounter’s web page in the Library, select the link Click here to see the spots mapped to the image, which appears above the image you submitted to see the spots remapped to the image and to confirm their accuracy.

Figure 18. The spot data file itself in Wildbook for Whale Sharks.

Figure 19. Ensuring that submitted spots remap to the original image correctly in Wildbook for Whale Sharks.


The following video demonstrates using Interconnect to map spots and submit them to Wildbook for Whale Sharks.

Next: Comparing spot patterns with sharkGrid
Previous: Approving or rejecting an encounter

processing_a_new_encounter.txt · Last modified: 2018/09/15 23:10 (external edit)