0

I have two pictures -- for simplicity, let's say one contains a pot plant in a garden (let's call it potplant.nef), and the second contains the same scene, but minus the pot plant (i.e. just the background - let's call it garden.nef). I want to remove the background from the picture with the pot plant so that I just have the pot plant so I can lift and drop that into a different background.

I would like to this with ImageMagick.

Now I know there's various questions, answers here, and to different levels of success, but in this case, I took the photos as RAW (not PNG, not JPG, specifically to avoid some of the issues raised in the other questions). What's the best way of doing this?

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
Blender Fox
  • 4,442
  • 2
  • 17
  • 30
  • You understand that you would need to have used a tripod for this and hope neither the camera nor anything else moved between the two frames and that the exposure settings and lighting were identical? – Mark Setchell Dec 29 '18 at 09:01
  • Further, you understand that the result will not be a NEF file as ImageMagick doesn't write raw files? – Mark Setchell Dec 29 '18 at 09:02
  • See https://imagemagick.org/Usage/masking/#known_bgnd – fmw42 Dec 29 '18 at 18:49
  • @MarkSetchell Yes, I have a tripod and the same settings are used on both. In fact, I had it set to repeatedly take pictures so yes, they would be the same. – Blender Fox Dec 29 '18 at 19:42
  • @MarkSetchell and yes to the second point. I have no issue with the output not being NEF coming out of ImageMagick. – Blender Fox Dec 29 '18 at 19:42
  • Start by converting your RAW to JPG in some raw processing application. I assume you were in all-manual mode (so the camera didn't change its settings due to the plant). Doing that processing yourself (instead of in-camera), lets you ensure that the raw-processing app applies the very same settings for both pictures (which would not necessarily be true if this were the in-camera JPG). I assume you were using a contrasting background (because it this is just other green plants, software will have a hard time distinguishing the plant fro the background). – xenoid Dec 30 '18 at 21:38

0 Answers0