The Power of RAW on iPhone, Part 1: Shooting RAW
iPhone 上 RAW 的威力,第 1 部分:拍摄 RAW 图像

Sebastiaan de With
Nov 30, 2017  2017 年 11 月 30 日
9 min read

I take a lot of photos. Usually I pack either a Sony A7R2 or a Leica M—two cameras with massive sensors and brilliant lenses.
我经常拍照。通常我会带上索尼 A7R2 或徕卡 M--两款拥有超大传感器和超强镜头的相机。

But lately, I’ve been shooting exclusively with the iPhone X, and have found it absolutely excellent.
但最近,我只用 iPhone X 进行拍摄,并发现它绝对出色。

I am the design half of the team that makes the iPhone app Halide, which is a camera app with manual controls and, most importantly, RAW capture.
我是 iPhone 应用程序Halide 的设计团队成员之一,这是一款具有手动控制功能的相机应用程序,最重要的是,它可以捕捉 RAW 格式的图像。

RAW is a file format that holds an incredible amount of information. We’ll get into the details later, but first let’s show what you can do with it.
RAW 是一种拥有大量信息的文件格式。我们稍后会详细介绍,但首先让我们来看看你能用它做些什么。

Left: a RAW image out of the iPhone X. Right: the image after editing.
左图:iPhone X 输出的 RAW 图像。右图:编辑后的图像。

RAW affords you editing freedom. Absolute freedom to change the colors and white balance of a photo, or recover too-bright highlights and too-dark shadows.
RAW 为您提供编辑自由。绝对自由地更改照片的色彩和白平衡,或恢复过亮的高光和过暗的阴影。

However, as awesome as RAW is, it’s important to know RAW isn’t a magic “enhance” button. Some of our users sometimes reach out with confusion about their RAW images looking worse than a regular capture from the stock camera app.
不过,尽管 RAW 技术非常出色,但重要的是要知道 RAW 并不是一个神奇的 "增强 "按钮。我们的一些用户有时会感到困惑,因为他们的 RAW 图像看起来比普通相机应用程序拍摄的图像更糟糕。

It’s helpful to understand how a RAW file is fundamentally different than JPEG, to fully understand the tradeoffs.
了解 RAW 文件与 JPEG 文件的本质区别,有助于充分理解其中的利弊得失。

So What’s a RAW file?
什么是 RAW 文件?

Think of the process of taking a photo as three steps:
将拍摄照片的过程视为三个步骤:

1. A sensor captures light
1.传感器捕捉光线

2. Software translates detected light values into an image
2.软件将检测到的光值转换成图像

3. The image is saved as a file, like JPEG
3.图像保存为 JPEG 文件

The camera in your iPhone is an incredibly complex little machine
iPhone 中的摄像头是一个极其复杂的小机器

Step 1 步骤 1

When you take a photo, light from the camera lens shines through several optical elements and falls on a small, smaller-than-a-pinkie-finger sensor behind the camera lens. The sensor has small individual spots that capture light, with small filters on them to capture the colors red, blue and green.
拍照时,相机镜头发出的光线穿过几个光学元件,落在相机镜头后面一个比粉红手指还小的小型传感器上。传感器上有捕捉光线的单个小光点,光点上的小滤光片可以捕捉到红、蓝、绿三种颜色。

This arrangement of color filters is called a ‘Bayer filter’.
这种滤色器的排列方式被称为 "拜耳滤色器"。

To understand RAW files, you need to know that what your camera sensor sees is very different than what makes it onto the screen. A RAW file just saves the values it measures on this sensor. If we took a look inside the file, it would look something like this:
要理解 RAW 文件,你需要知道相机传感器看到的东西与屏幕上的截然不同。RAW 文件只是保存它在传感器上测量到的数值。如果我们看一下文件内部,它看起来会是这样的:

That’s not very useful to us as humans. Here’s where the next step comes in.
这对我们人类来说用处不大。这就是下一步要做的。

Step 2 and 3 步骤 2 和 3

The data is passed to the imaging processor, a chip that takes what your sensor ‘saw’, does some magic (we will get to this later) and instantly converts it to a JPEG (or HEIC) file, finally storing it on your phone.
数据被传送到成像处理器,这个芯片会接收传感器 "看到 "的数据,然后施展一些魔法(我们稍后会讲到),立即将其转换为 JPEG(或 HEIC)文件,最后将其存储到手机中。

This is processing, a hardware and software process that translates those individual red, green, and blue patches into this:
这是一个硬件和软件处理过程,将这些单独的红、绿、蓝光片转换成这个效果:

… and discards the rest of the sensor data. Voilá: your photo.
......并丢弃传感器的其他数据。这就是你的照片。

That’s the process for a JPG. Processing RAW files is a lot of work, so that’s why Apple saves the processed file as a JPEG or HEIC. These require much less space, and they’re much faster to load.
这就是 JPG 的处理过程。处理 RAW 文件的工作量很大,所以苹果会将处理后的文件保存为 JPEG 或 HEIC。这些文件所需的空间小得多,加载速度也快得多。

However, they do this by throwing out information that your monitor doesn’t need, and details that your eyes can’t see.
不过,它们会丢弃显示器不需要的信息和眼睛看不到的细节

When you shoot JPEG, you really need to get the photo perfect at the time you take it. With RAW and its extra data, you can easily fix mistakes, and you get a lot more room to experiment.
在拍摄 JPEG 照片时,您确实需要在拍摄时将照片做到完美。有了 RAW 和它的额外数据,您就可以轻松修正错误,并获得更多的实验空间。

What kind of data? RAW files store more information about detail in the highlights (the bright parts) and the shadows (the dark parts) of an image. Since you often want to ‘recover’ a slightly over or under-exposed photo, this is immensely useful.
什么样的数据?RAW 文件存储了更多关于图像高光(明亮部分)和阴影(黑暗部分)细节的信息。由于您经常需要 "恢复 "曝光过度或曝光不足的照片,这一点非常有用。

It also stores information that enables you to change white balance later on. White balance is a constantly measured value that cameras try to get right to ensure the colors look natural in a scene. iPhones are quite good at this, but it starts to get more difficult when light is tinted.
它还可以存储信息,让你日后更改白平衡。白平衡是一个不断测量的值,相机会努力将其调整到正确的位置,以确保场景中的色彩看起来自然。iPhone 在这方面做得很好,但当光线有色差时,白平衡就开始变得更加困难。

Many of us have felt disappointment when we photograph a beautiful sunset only to find it looking entirely unlike what our eyes see. With RAW, you can change the image afterward to make it resemble what you actually saw. A JPEG capture essentially commits to the white balance the camera estimates was accurate when the photo was taken.
我们中的许多人都曾有过这样的经历:当我们拍下美丽的日落时,却发现它与我们的眼睛所看到的完全不同。有了 RAW 格式,您就可以在拍摄后更改图像,使其与您实际看到的相似。而 JPEG 格式的照片基本上是按照拍摄时相机估计的白平衡来拍摄的。

In essence, the stock camera app decides how to process RAW files for you, making choices like ‘What is the most natural white balance?’. Sometimes it’s wrong; sometimes you want to go in a different creative direction. Processing photos is just as much art as science.

So, should you always shoot RAW?

No. RAW isn’t always the best choice. Because RAW files can’t use lossy compression, they’re about 10 megabytes, while the humble JPEG is under three megabytes. If you’re taking a photo of where you parked, RAW is probably overkill.

But there’s a more serious issue: a lot of people turn on RAW, and they’re confused at photos looking kind of… bad. What’s going on?
但还有一个更严重的问题:很多人在打开 RAW 后,会对照片看起来有点......糟糕感到困惑。这是怎么回事?

RAW Caveat 1: Always Check for RAW Support
RAW 注意事项 1:始终检查是否支持 RAW

We’re not just talking about the app you use to take the photo: only load RAW files in apps you know support RAW files. This is very confusing because RAW files look like regular image files to most apps.
我们说的不仅仅是你用来拍摄照片的应用程序:只在你知道支持 RAW 文件的应用程序中加载 RAW 文件。这一点非常容易混淆,因为对于大多数应用程序来说,RAW 文件看起来就像普通图像文件。

Remember how we said RAW files are really slow to load? It would be annoying to flip through a folder, trying to find a particular photo, and have to wait a few seconds for every file to load.
还记得我们说过 RAW 文件的加载速度非常慢吗?在文件夹中翻来翻去,试图找到某张照片,但每个文件都要等上几秒钟才能加载,这实在是太烦人了。

That’s why RAW files also contain a very low resolution preview image. It isn’t designed for editing, just finding your photo. This preview is only half a megapixel, while the real image inside is over twelve megapixels.
这就是为什么 RAW 文件也包含分辨率非常低的预览图像。它不是用来编辑的,只是用来查找照片。这个预览图只有半百万像素,而里面的真实图像则超过 1200 万像素。

Now this is where most people get confused: apps that don’t support RAW will still load the image. However, they just load the low resolution preview instead of the full-resolution image. And they won’t warn you. Believe it or not, the built in iOS Photos app doesn’t support RAW, and that’s why you see this:
这就是大多数人感到困惑的地方:不支持 RAW 的应用程序仍会加载图像。不过,它们只是加载低分辨率预览,而不是全分辨率图像。而且它们不会向你发出警告。信不信由你,iOS 内置的照片 app 并不支持 RAW 格式,所以你才会看到这种情况:

Most of our bad reviews mention blurry images. Our top support requests are the same. As iOS still doesn’t inform users in the Photos app that an image is a RAW file, we recommend you edit RAW files in Darkroom, Snapseed, VSCO, or Lightroom. As soon as you do this, the problem is solved.
我们的大多数差评都提到图像模糊。我们收到的最多支持请求也是如此。由于 iOS 仍未在照片 app 中告知用户图像是 RAW 文件,我们建议你在暗房、Snapseed、VSCO 或 Lightroom 中编辑 RAW 文件。只要这样做,问题就会迎刃而解。

It’s easy to blame users for being ignorant, but honestly, we were just as surprised by how iOS handles RAW files—and we build a camera app!
指责用户无知很容易,但老实说,我们对 iOS 处理 RAW 文件的方式同样感到惊讶,而且我们开发的是一款相机应用!

We’ve found a solution: in our next big update, we’ll save both a RAW and a Processed image in your camera roll. It’ll look like single image, so it won’t clutter your camera roll. Apps that support RAW will know how to access it, while apps that don’t will fall back to a *full resolution*, preprocessed image. This will be much less surprising to people.
我们已经找到了解决方案:在下一次重大更新中,我们将在你的相机胶卷中同时保存 RAW 和处理过的图像。它看起来就像一张图片,因此不会让你的相机胶卷变得杂乱无章。支持 RAW 格式的应用程序将知道如何访问它,而不支持 RAW 格式的应用程序将退回到*全分辨率*的预处理图像。这样人们就不会那么惊讶了。

We’ll have an option to opt-out of this, if you want to save a little storage space. In this situation, we’ll only save RAW, and no accompanying JPEG.
如果您想节省一点存储空间,我们将提供一个选项来选择不保存。在这种情况下,我们将只保存 RAW 格式,而不附带 JPEG 格式。

RAW Caveat 2: RAW Skips Apple’s Magic
RAW 注意事项 2:RAW 跳过苹果的魔术

Apple’s stock camera app does a lot of cleanup behind the scenes. This is ‘magic’. Yes, magic. The imaging processor in every smartphone and camera does some magic. This is the kind of stuff that is a closely guarded secret.
苹果的照相机应用程序会在幕后进行大量的清理工作。这就是 "魔法"。是的,魔法。每部智能手机和相机中的成像处理器都会施展一些魔法。这些都是严守的秘密。

On the left is raw data from the sensor, and on the right is what the photo looks like after the “magic” is applied. There’s a lot going on here: advanced noise reduction (hardware-based in your new iPhones 8 and X!), merging several exposures to get more detail in the highlights and shadows, and picking the sharpest frame in a set of photos to reduce the movement of your hands.
左边是来自传感器的原始数据,右边是经过 "魔法 "处理后的照片。这里发生了很多事情:高级降噪(新款 iPhone 8 和 X 采用硬件降噪!)、合并多次曝光以获得更多的高光和阴影细节,以及在一组照片中挑选最清晰的一帧以减少手的移动。

Sounds wonderful, but this isn’t always great. Sometimes the noise reduction is aggressive and destroys fine detail; other times the grain can be pleasant.
听起来很棒,但并不总是很好。有时降噪效果很强,会破坏细腻的细节;有时颗粒感会很舒服。

Left: Noise-reduced stock camera app image. Right: RAW capture. Some of iPhone’s aggressive noise reduction can look odd, or ‘smudgy’.
左图:经过降噪处理的相机应用程序图片。右图RAW 捕捉。iPhone 的某些强力降噪功能可能看起来很奇怪,或者 "模糊不清"。

I find that the new iPhones have a type of noise that isn’t always bothersome. In some shots, it can almost look like film grain.
我发现,新款 iPhone 的噪点并不总是令人讨厌。在某些镜头中,它看起来几乎像胶片颗粒。

However, if you’re shooting in very low light, where the grain can get extreme, you may benefit from noise reduction.
不过,如果您在光线非常暗的地方拍摄,颗粒会变得非常大,您可能会从降噪中受益。

Mind, you could do this noise reduction yourself: there’s plenty of noise reduction software to chose from, but Apple’s is really quite great, and it would further complicate your editing workflow.
当然,你也可以自己进行降噪处理:有很多降噪软件可供选择,但苹果的降噪软件确实非常棒,而且会让你的剪辑工作流程更加复杂。

RAW Caveat 3: Portrait Mode
RAW 注意事项 3:肖像模式

You also lose “Portrait Mode.” When shooting in this mode, iOS is taking two photos simultaneously and measuring their differences to figure out the depth of objects in scenes. While in this mode, RAW capture is unavailable.
你还会失去 "人像模式"。在该模式下拍摄时,iOS 会同时拍摄两张照片,并测量它们之间的差异,以确定场景中物体的深度。在该模式下,RAW 捕捉不可用。

(Depth maps, which are created by measuring this difference, do look cool though—and we can capture them, just not while also shooting in RAW.)
(深度图是通过测量这种差异而生成的,看起来确实很酷--我们可以捕捉它们,只是不能同时使用 RAW 格式拍摄)。

We don’t know Apple’s precise reasons, but we do know calculating depth-maps is very taxing on your phone. We wouldn’t be surprised if it is just about performance. Hopefully someday they’ll unlock the ability to capture RAW while in portrait mode.
我们不知道苹果的确切原因,但我们知道计算深度贴图对手机的负荷非常大。如果只是为了性能,我们也不会感到惊讶。希望有一天他们能解锁在人像模式下拍摄 RAW 格式照片的功能。

Conclusion 结论

When you’re informed about its benefits and drawbacks, shooting in RAW on your iPhone can lead to some spectacular results! I’ll be posting an article next week with tips on how you can edit your RAWs to get great images like you see in this post.
当你了解了RAW格式的优点和缺点后,在iPhone上使用RAW格式拍摄就能获得惊人的效果!我将在下周发布一篇文章,介绍如何编辑 RAW 文件,以获得像本篇文章中所见的出色图像。

In the mean time, we’re working hard on Halide 1.6 to ease some of iOS’ quirks when it comes to RAW support. We think it’ll help a lot of users that are confused about RAW, and we have a few more tricks up our sleeve to make it an awesome release. Stay tuned!
与此同时,我们正在努力开发Halide1.6,以缓解 iOS 在 RAW 支持方面的一些怪癖。我们认为这将帮助很多对 RAW 感到困惑的用户,而且我们还准备了一些小技巧,让它成为一个出色的版本。敬请期待!

Thanks to Ben Sandofsky.  感谢 Ben Sandofsky。