issue116:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédenteDernière révisionLes deux révisions suivantes | ||
issue116:c_c [2017/01/02 15:39] – créée auntiee | issue116:c_c [2017/01/12 10:25] – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Over the course of this last month, I’ve helped to take numerous photographs of hats for my mother, who is a milliner. In doing so, I’ve found a good set of tools for tethered shooting (controlling the camera via a computer), removing backgrounds, | + | **Over the course of this last month, I’ve helped to take numerous photographs of hats for my mother, who is a milliner. In doing so, I’ve found a good set of tools for tethered shooting (controlling the camera via a computer), removing backgrounds, |
Tethered Shooting | Tethered Shooting | ||
Ligne 6: | Ligne 6: | ||
How I used it was pretty simple - I simply ran: | How I used it was pretty simple - I simply ran: | ||
+ | |||
+ | gphoto2 --capture-image-and-download --filename=”IMG.JPG”** | ||
+ | |||
+ | Au cours du dernier mois, j'ai aidé à prendre de nombreuses photos de chapeau pour ma mère, qui est chapelière. Ce faisant, j'ai trouvé un bon jeu d' | ||
+ | |||
+ | Connecter la prise de vue | ||
+ | |||
+ | Pour cela, j'ai analysé quelques options - l' | ||
+ | |||
+ | Ma façon de l' | ||
gphoto2 --capture-image-and-download --filename=”IMG.JPG” | gphoto2 --capture-image-and-download --filename=”IMG.JPG” | ||
- | This resulted in the image (IMG.JPG) in the current working directory. I updated the filenames as I took photos, but, if you set up intervals, or take a batch of photos at once, it will auto-increment. By default, photos are called capt0000.jpg. It also offers a few preview options, though my camera didn’t support it. Instead, I simply use the viewfinder to adjust the zoom/focus, and relied on my tripod to keep everything steady between shots. Once the photo was taken and downloaded, I checked it and either moved on to the next hat, or took another photo. | + | **This resulted in the image (IMG.JPG) in the current working directory. I updated the filenames as I took photos, but, if you set up intervals, or take a batch of photos at once, it will auto-increment. By default, photos are called capt0000.jpg. It also offers a few preview options, though my camera didn’t support it. Instead, I simply use the viewfinder to adjust the zoom/focus, and relied on my tripod to keep everything steady between shots. Once the photo was taken and downloaded, I checked it and either moved on to the next hat, or took another photo. |
- | Overall, this was pretty painless, and felt easier and quicker to me than Lightroom did. If you don’t like the command-line, | + | Overall, this was pretty painless, and felt easier and quicker to me than Lightroom did. If you don’t like the command-line, |
- | Background Removal | + | Le résultat est une image (IMG.JPG) dans le répertoire de travail courant. Je mettais à jour les noms de fichier tout en prenant les photos, mais, si vous réglez des intervalles, |
+ | |||
+ | Généralement, | ||
+ | |||
+ | **Background Removal | ||
The photos we took were taken on a black backdrop, which worked pretty well. However, if the photos are later used for an online shop, or if we find the background too dark, I wanted to investigate background removal - so we could swap out the background for something lighter. I was looking for a quick and easy solution, as opposed to using something like the GIMP and the foreground select tool. Unfortunately, | The photos we took were taken on a black backdrop, which worked pretty well. However, if the photos are later used for an online shop, or if we find the background too dark, I wanted to investigate background removal - so we could swap out the background for something lighter. I was looking for a quick and easy solution, as opposed to using something like the GIMP and the foreground select tool. Unfortunately, | ||
Ligne 21: | Ligne 35: | ||
Super PhotoCut (macOS-only) | Super PhotoCut (macOS-only) | ||
- | For those of us not able (or willing) to take those approaches, we have a few limited options. Either we can use GIMP, or ImageMagick, | + | For those of us not able (or willing) to take those approaches, we have a few limited options. Either we can use GIMP, or ImageMagick, |
- | Using ImageMagick | + | Suppression du fond |
+ | |||
+ | Nos photos étaient prises sur un arrière-plan noir, ce qui fonctionnait plutôt bien. Cependant, pour des photos utilisées par la suite pour un magasin en ligne, ou si nous trouvions le fond trop sombre, j'ai voulu rechercher un suppresseur de fond - de sorte que nous puissions remplacer le fond par quelque chose de plus clair. Je cherchais une solution rapide et simple, contrairement à l' | ||
+ | https:// | ||
+ | https:// | ||
+ | PhotoScissor (logiciel) | ||
+ | Super PhotoCut (uniquement pour macOS) | ||
+ | |||
+ | Pour ceux qui sont incapables (ou ne veulent pas) adopter ces solutions, il y a un choix limité. On peut utiliser, soit GIMP, soit ImageMagik, pour retirer les arrières-plans. | ||
+ | |||
+ | |||
+ | **Using ImageMagick | ||
If you’re planning to use ImageMagick, | If you’re planning to use ImageMagick, | ||
Ligne 31: | Ligne 56: | ||
The original image: | The original image: | ||
Generating a difference mask: | Generating a difference mask: | ||
+ | |||
+ | convert walmfmzzz.jpg \( +clone -fx ' | ||
+ | |||
+ | Utilisation d' | ||
+ | |||
+ | Si vous prévoyez d' | ||
+ | |||
+ | Vous pouvez utiliser différentes méthodes. Si vous avez un fond relativement simple, il y a plusieurs choses que vous pouvez faire. Pour cet exemple, je vais enlever le fond texturé venant d'un fond d' | ||
+ | |||
+ | L' | ||
+ | |||
+ | Génération du masque des différences : | ||
convert walmfmzzz.jpg \( +clone -fx ' | convert walmfmzzz.jpg \( +clone -fx ' | ||
- | Turning the mask into a threshold map: | + | **Turning the mask into a threshold map: |
convert difference.png -threshold 25% boolean_mask.png | convert difference.png -threshold 25% boolean_mask.png | ||
Ligne 44: | Ligne 81: | ||
convert walmfmzzz.jpg boolean_mask.png -alpha Off -compose CopyOpacity -composite walmfmzzz_threshold.png | convert walmfmzzz.jpg boolean_mask.png -alpha Off -compose CopyOpacity -composite walmfmzzz_threshold.png | ||
- | As you can see, it removed all of the background, and the object itself (the Arch logo) is still in pretty decent shape. You could now place it on a different background, or colorify just the object and place it back onto the original image. Unfortunately, | + | As you can see, it removed all of the background, and the object itself (the Arch logo) is still in pretty decent shape. You could now place it on a different background, or colorify just the object and place it back onto the original image. Unfortunately, |
- | GIMP | + | Transformation du masque en carte de seuil : |
+ | |||
+ | convert difference.png -threshold 25% boolean_mask.png | ||
+ | |||
+ | Note : jouez avec le seuil pour réduire la sélection à juste l' | ||
+ | |||
+ | Superposez la carte sur l' | ||
+ | |||
+ | convert walmfmzzz.jpg boolean_mask.png -alpha Off -compose CopyOpacity -composite walmfmzzz_threshold.png | ||
+ | |||
+ | Comme vous pouvez le voir, cela enlève tout le fond, et l' | ||
+ | |||
+ | **GIMP | ||
The process here is tedious, and not very effective (in my experience at least). There are a variety of ways to do it. There is a foreground select tool, where you can outline the object you want to keep, and it will do its best to give a good selection of it (which has never worked well for me). Or you can duplicate the layer, make it grayscale, and then play with levels or a paintbrush, until the object you want to keep is painted white, and everything else is black. Then create a layer mask on the original image layer, and copy & paste the grayscale layer into the mask. It should result in an okay cut-out of the object. Afterwards, you can zoom in and slowly paint anything in black or white with a small brush that should be transparent or visible. | The process here is tedious, and not very effective (in my experience at least). There are a variety of ways to do it. There is a foreground select tool, where you can outline the object you want to keep, and it will do its best to give a good selection of it (which has never worked well for me). Or you can duplicate the layer, make it grayscale, and then play with levels or a paintbrush, until the object you want to keep is painted white, and everything else is black. Then create a layer mask on the original image layer, and copy & paste the grayscale layer into the mask. It should result in an okay cut-out of the object. Afterwards, you can zoom in and slowly paint anything in black or white with a small brush that should be transparent or visible. | ||
- | I don’t find this process to be an effective way to remove backgrounds for anything besides a single photo here and there, and it is extremely tedious when you have complex backgrounds - I often end up with a halo of visible background around the object, or else I get jagged edges from trying to paint it out. | + | I don’t find this process to be an effective way to remove backgrounds for anything besides a single photo here and there, and it is extremely tedious when you have complex backgrounds - I often end up with a halo of visible background around the object, or else I get jagged edges from trying to paint it out.** |
- | Conclusion | + | GIMP |
+ | |||
+ | Ici, le mode opératoire est fastidieux et pas très efficace (au moins d' | ||
+ | |||
+ | Je ne trouve pas ce procédé très efficace pour enlever les arrières-plans sauf pour une seule photo de temps en temps, et c'est particulièrement pénible quand le fond d' | ||
+ | |||
+ | **Conclusion | ||
Gphoto2 is a wonderful solution for tethered capture - but unfortunately, | Gphoto2 is a wonderful solution for tethered capture - but unfortunately, | ||
- | Do you know of a better way to do this? If so, I would be thrilled to hear about it. Feel free to email any questions, suggestions, | + | Do you know of a better way to do this? If so, I would be thrilled to hear about it. Feel free to email any questions, suggestions, |
+ | |||
+ | Conclusion | ||
+ | |||
+ | Gphoto2 est une merveilleuse solution pour contrôler la capture - mais, malheureusement, | ||
+ | |||
+ | Connaissez-vous une meilleure solution pour le faire ? Si c'est le cas, je serai ravi d'en entendre parler. N' |
issue116/c_c.txt · Dernière modification : 2017/01/12 11:28 de andre_domenech