Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
Thread started 09 Aug 2011 (Tuesday) 15:13
Search threadPrev/next
sponsored links (only for non-logged)

How do you save an alpha channel to an image?

 
TGrundvig
Goldmember
Avatar
2,876 posts
Likes: 3
Joined Oct 2009
Location: Colorado
     
Aug 09, 2011 15:13 |  #1

I'm trying to experiment with a program I have called Enfuse. It will allow me to load images that have an alpha channel, but when I do that I get an error message. Therefore, I must be doing something wrong when I save the alpha channel.

Can someone explain to me the steps I need to take to do this correctly?


1Ds Mk II, 1D Mk II, 50D, 40D, XT (for my son), 17-40L, 24-105L, Bigma 50-500 EX DG, Sigma 150 Macro EX DG, Tokina 12-24 AT-X, Nifty Fifty, Tamron 28-300 (for my son), 580ex II, 430ex II

  
  LOG IN TO REPLY
tal_ninio
Junior Member
20 posts
Joined Feb 2011
     
Aug 09, 2011 15:22 |  #2

Create a selection with any selection tool, the go to Select > Save Selection.
This converts the selection into an alpha channel.
Now save the file in a format which Enfuse can load (it should be TIFF, PSD or TARGA).




  
  LOG IN TO REPLY
TGrundvig
THREAD ­ STARTER
Goldmember
Avatar
2,876 posts
Likes: 3
Joined Oct 2009
Location: Colorado
     
Aug 09, 2011 16:17 |  #3

I guess its an issue with Enfuse, because the files saved just fine. I can even see the areas that are blocked out by the alpha channels when I look at them. However, Enfuse is not picking up on it for some reason.

Thanks, I'm closer than I was. LOL


1Ds Mk II, 1D Mk II, 50D, 40D, XT (for my son), 17-40L, 24-105L, Bigma 50-500 EX DG, Sigma 150 Macro EX DG, Tokina 12-24 AT-X, Nifty Fifty, Tamron 28-300 (for my son), 580ex II, 430ex II

  
  LOG IN TO REPLY
Maxdave
Goldmember
Avatar
1,162 posts
Gallery: 49 photos
Likes: 101
Joined Apr 2007
Location: Chatham, Ontario, Canada
     
Aug 10, 2011 08:40 as a reply to  @ TGrundvig's post |  #4

Not sure if this helps, but ...

I also use Enfuse (EnfuseGUI to be exact). If I do a conversion from RAW to 16-bit TIF out of DPP, Enfuse can not use/read/work on the files; however, if I run those files through the CS5 Image Processor function, saving as 16-bit TIFs, those re-converted TIFs do work. The files are not the same, the file sizes differ slightly, so something must be different.

Maxdave


5D3,1D4,S90,6S&Moment Lenses,Hero4Silver,GPS​-E2,2x580EX,430EX,90EX,​EF16-35L f/4 IS,Samy SYTS24-C 24TS,EF24-105L IS,EF50 f/1.4,EF70-200 f/4L IS,EF300 f/4L IS,EF100-400L I IS,Kenko DGX 1.4X,Canon 2X TC Mk II, RRS&Pro-Media L-Brackets,Manfrotto MHXPRO-3WG & Roller 50,Sirui 306&K-20,Giottos MT-7371&MH-3300,Velbon ElCarmagne 530,CamRanger,Phottix&​Canon Remotes,Lowepro Backpack,ThinkTank Retro 20&Modular System,OpTech straps,Lexar/San Disk Cards

  
  LOG IN TO REPLY
TGrundvig
THREAD ­ STARTER
Goldmember
Avatar
2,876 posts
Likes: 3
Joined Oct 2009
Location: Colorado
     
Aug 10, 2011 09:11 |  #5

Maxdave,

I know how to use Enfuse, I use it via the LR/Enfuse plug-in and it works just fine in that aspect. What I'm trying to figure out is how to use Enfuse with Alpha Channels applied to the images. Enfuse claims it can read Alpha Channels, but when I load those images into Enfuse it does not work. The advantage of using Alpha Channels (theoretically) is that I can select pixels (dark shadows for example) that I do not want to be considered by giving those pixels a value of zero. That way, Enfuse will not consider those pixel for blending.

I am starting to think that I need to learn more about the line commands to maximize my results.

Thanks for the replies!


1Ds Mk II, 1D Mk II, 50D, 40D, XT (for my son), 17-40L, 24-105L, Bigma 50-500 EX DG, Sigma 150 Macro EX DG, Tokina 12-24 AT-X, Nifty Fifty, Tamron 28-300 (for my son), 580ex II, 430ex II

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,597 posts
Gallery: 5 photos
Likes: 1542
Joined Feb 2008
Location: Philadelphia, PA USA
     
Aug 10, 2011 11:26 |  #6

Hey T,

There are a couple of things you need to make sure you do to get Enfuse cranking with your alpha channels. First, you need to save your source images in a format that supports alpha channels (TIFF, PNG, TARGA). If you are taking your source images into Photoshop and adding an alpha there, remember to check the appropriate box to tell Photoshop to save the alpha channel! This is sometimes overlooked and can drive one crazy when trying to troubleshoot.

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-D78V26N/0/X2/AlphaTickbox-X2.jpg

Next, consider using the command line version of Enfuse - it is really pretty straightforward, and in its most basic form you simply enter at the command line something like:


enfuse [Input_image_01] [Input_image_02] [Input_image_N] -o [output_image.extensio​n]

Here is an example of the Terminal verbiage in OS X's Terminal:



KT-Laptop:dxo6 kirkt$ enfuse-openmp /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​2enfuse.tif /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​7enfuse.tif /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_001​0enfuse.tif -o default.tif
enfuse: info: input image "/Users/kirkt/Desktop/​EnfuseTest/dxo6/_MG_00​02enfuse.tif" does not have an alpha channel;
enfuse: info: assuming all pixels should contribute to the final image
enfuse: info: input image "/Users/kirkt/Desktop/​EnfuseTest/dxo6/_MG_00​07enfuse.tif" does not have an alpha channel;
enfuse: info: assuming all pixels should contribute to the final image
enfuse: info: input image "/Users/kirkt/Desktop/​EnfuseTest/dxo6/_MG_00​10enfuse.tif" does not have an alpha channel;
enfuse: info: assuming all pixels should contribute to the final image
enfuse: info: loading next image: /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​2enfuse.tif 1/1
enfuse: info: loading next image: /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​7enfuse.tif 1/1
enfuse: info: loading next image: /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_001​0enfuse.tif 1/1

Note that Enfuse tells you that it did not detect any alpha channels in the input images, so all pixels will be considered in the operation. "Enfuse-openmp" is a multiprocessor aware version of enfuse.

Here is the image set I used in this example:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-27TJDZH/0/X3/Composite-X3.jpg

Here is the result of the above, default Enfusion:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-gDm6Kng/0/X3/default-X3.jpg

Note that the overall result is bright, but you can see detail in the outside trees in the window. I could tinker with the various Enfuse parameters to adjust the exposure, contrast and saturation emphasis in the blend, but for this example, we will just accept the defaults.

Now, let's say that I don't want that detail in the window area, taken from the darkest exposure - say I want the window portal to appear blown out (for whatever reason). So, I will create an alpha channel in the darkest exposure that I will paint black in the window area (to reject those pixels from consideration in the blend) and white everywhere else. This will force Enfuse to use pixels for that area from the lighter exposures, where that area is blown.

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-kppFT2R/0/X3/Alpha-X3.jpg

The red mask shows you the area that I created and filled with black to reject the window pixels. Here is the resulting alpha mask:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-N7mmkF3/0/X3/alphachannelmask-X3.jpg

I saved this TIFF as a new version of the darkest exposure, this time with the alpha included. Now if I rerun Enfuse but use the alpha-equipped darkest exposure, here is what happens in the Terminal:



KT-Laptop:dxo6 kirkt$ enfuse-openmp /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​2enfuse-alpha.tif /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​7enfuse.tif /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_001​0enfuse.tif -o alphaout.tif
enfuse: warning: /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​2enfuse-alpha.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored
enfuse: info: input image "/Users/kirkt/Desktop/​EnfuseTest/dxo6/_MG_00​07enfuse.tif" does not have an alpha channel;
enfuse: info: assuming all pixels should contribute to the final image
enfuse: info: input image "/Users/kirkt/Desktop/​EnfuseTest/dxo6/_MG_00​10enfuse.tif" does not have an alpha channel;
enfuse: info: assuming all pixels should contribute to the final image
enfuse: info: loading next image: /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​2enfuse-alpha.tif 1/1
enfuse: info: loading next image: /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_000​7enfuse.tif 1/1
enfuse: info: loading next image: /Users/kirkt/Desktop/E​nfuseTest/dxo6/_MG_001​0enfuse.tif 1/1

and here is the resulting image:

IMAGE: http://kirkt.smugmug.com/Photography/Photo-of-the-Day/i-q77BMKT/0/X3/alphaout-X3.jpg

Note the window area is now blown, as I desired.

Hope this helps.

kirk

Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
TGrundvig
THREAD ­ STARTER
Goldmember
Avatar
2,876 posts
Likes: 3
Joined Oct 2009
Location: Colorado
     
Aug 10, 2011 16:28 |  #7

Kirk,

Yes, that does help and pretty much what I figured out but one thing I'm not understanding is the 'fill with black' part. Once you create an Alpha Channel and apply it to the image, doesn't it act like a layer mask blocking out the selected pixels automatically? If not, what steps are you taking to 'fill' with black?

Thanks!


1Ds Mk II, 1D Mk II, 50D, 40D, XT (for my son), 17-40L, 24-105L, Bigma 50-500 EX DG, Sigma 150 Macro EX DG, Tokina 12-24 AT-X, Nifty Fifty, Tamron 28-300 (for my son), 580ex II, 430ex II

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,597 posts
Gallery: 5 photos
Likes: 1542
Joined Feb 2008
Location: Philadelphia, PA USA
     
Aug 10, 2011 17:53 |  #8

To make the alpha, you have to go to the channels palette and create a new channel - it should be labeled Alpha 1 by default. This is where you place your black and white "mask". You can make your mask on a normal layer and then Select All, Copy, and then Paste the mask into the Alpha. Or, you can make the selection of what you want to mask in the normal layers view and then, with the selection active, switch to the Alpha channel and fill as usual. However you make your black and white mask, it is not a layer mask, it is an alpha channel.

Painting on an Alpha channel is the same as painting a regular layer mask. It does not need to be active or visible when you save the file (as a TIFF, or whatever) you just need to remember to check the "Alpha Channels" check box in the Save dialog to make sure it gets saved in the TIFF.

Kirk


HOSTED PHOTO
please log in to view hosted photos in full size.


Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
TGrundvig
THREAD ­ STARTER
Goldmember
Avatar
2,876 posts
Likes: 3
Joined Oct 2009
Location: Colorado
     
Aug 10, 2011 19:24 |  #9

Thanks!


1Ds Mk II, 1D Mk II, 50D, 40D, XT (for my son), 17-40L, 24-105L, Bigma 50-500 EX DG, Sigma 150 Macro EX DG, Tokina 12-24 AT-X, Nifty Fifty, Tamron 28-300 (for my son), 580ex II, 430ex II

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

2,368 views & 0 likes for this thread, 4 members have posted to it.
How do you save an alpha channel to an image?
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is Monkeytoes
1386 guests, 175 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.