我的NPI项目之Camera - 基础知识

目录

HDR技术说明:

HDR作用和做法: 

Logic of HDR

Realization in Samsung 13MP Camera Module

Utilization of Qualcomm ISP

Example of HDR Output

HDR中,是软件和硬件哪个涉及的更多些,或者更具有决定性?

Hardware Contributions

Software Contributions

Conclusion: Which Contributes More?

HDR中的曝光控制Samsung Smartphones

Exposure Control in HDR on Samsung Smartphones

Example of HDR Exposure Management

Conclusion

Snsor analog gain and ISP gain

Sensor Analog Gain

1. Basic Concept

2. Working Principle

3. Application Scenarios

ISP Gain

1. Basic Concept

2. Working Principle

3. Application Scenarios

ISP Gain 过大导致的问题举例

Banding Artifacts

Example Scenario

Cause

Color Distortion

Example Scenario

Cause

Example in a Landscape Image


常用的Camera模组类型:

通常模组厂有如下的一些: 比亚迪BYD/三星/海格/通信达. 

但是一个camera模组中却另有一番天地, 例如, 镜头\马达\Sensor\Shutter 等等. 另外还有, 各个模块的特性. 那么,我们在选择的过程中比较关心的是什么呢?

当Camera在一个项目中bringup起来之后就可以了吗? 当然不是. Camera是给人用的,要涉及到很多tuning的工作来适配不通的使用场景.

例如, 高动态场景. HDR, 那什么是DR? 什么是HDR? 引用如下解释: HDR 技术讲解

HDR技术说明:

简单的说就是, 术语动态范围描述了图像最亮部分和最暗部分之间的比率。HDR(或高动态范围)可以描述可用于捕捉比 SDR(标准动态范围,一种非 HDR 格式)像机传感器所能录制的动态范围更大的像机或技术。

既然,这个是一种技术, 我们来看一下高通平台是如何支持HDR的.(以下内容来自AI工具的回答)

HDR作用和做法: 

High Dynamic Range (HDR) imaging is a technique used to capture a greater range of luminosity than what is possible with standard digital imaging. In the context of a camera module, such as the Samsung 13MP camera, HDR is typically implemented to enhance photo quality by allowing detailed images to be captured in challenging lighting conditions.

Logic of HDR

HDR works by taking multiple photos at different exposure levels, usually one underexposed, one overexposed, and one at normal exposure. These images are then combined to create a single photograph that showcases details in both the shadows and highlights. The general workflow of HDR imaging includes:

  1. Capturing Multiple Exposures: The camera takes one image at a low exposure, one at standard exposure, and one at a high exposure. This ensures that all areas of the scene are captured well. 这里的low/standard/high是如何控制的?

  2. Aligning the Images: Using software, the camera aligns the images to correct any movement or differences in perspective caused by the shutter speed variations.

  3. Combining the Images: An algorithm merges the images, choosing the best pixels from each exposure based on the luminance. This results in a final image with improved contrast and detail.

  4. Tone Mapping: To ensure that the image looks natural when displayed on screens, tone mapping algorithms are applied, which adjust the brightness levels to fit within the display's capabilities.

Realization in Samsung 13MP Camera Module

In the Samsung 13MP camera module:

  • Sensors: The camera's sensor captures a wider dynamic range, allowing it to maintain details in bright and dark areas.

  • Software Processing: Samsung's image processing software uses sophisticated algorithms to merge the images effectively. It may rely on machine learning techniques to optimize the merging process and improve the final output.

  • User Interface: Users can typically activate HDR mode via the camera app, and the phone may intelligently decide when to use HDR based on lighting conditions.

Utilization of Qualcomm ISP

The Qualcomm Image Signal Processor (ISP) indeed plays a significant role in the HDR process on devices that utilize Qualcomm chipsets. Here's how it contributes:

  1. Image Processing: The ISP enhances the image quality by efficiently processing the multiple exposures and applying noise reduction algorithms, especially beneficial in low-light conditions.

  2. Alignment and Composition: The ISP aids in aligning the captured images before merging them, ensuring that moving subjects don’t result in ghosting effects.

  3. Real-time Processing: Qualcomm ISPs allow for real-time HDR processing, enabling users to see the HDR effect before taking a photo.

  4. Optimized Performance: The advanced processing capabilities of the ISP help in reducing the time taken to process HDR images, making it seamless for the user.

Example of HDR Output

To illustrate HDR, consider a scene featuring a bright sunset with a dark foreground (like trees). An HDR image created using the Samsung 13MP camera would show detailed colors in the clouds while also displaying the texture of the trees in the foreground, revealing a balanced overall image that wouldn’t be possible with standard exposure techniques.

HDR中,是软件和硬件哪个涉及的更多些,或者更具有决定性?

When it comes to HDR (High Dynamic Range) imaging, both hardware and software play crucial roles, but they contribute in different ways. Here's a breakdown of how each component influences the final result of HDR images:

Hardware Contributions

  1. Camera Sensor:

    • Higher-quality sensors can capture a wider dynamic range inherently. This means they can effectively record more details in the highlights and shadows during the capture process.
    • A sensor's ability to handle noise (especially in low-light conditions) also affects the final HDR image quality.  //低光的噪声抑制,很大层度上取决于sensor本身.
  2. Lenses:

    • Quality lenses can minimize distortion and chromatic aberration, ensuring that the sharpness and quality of detail in all parts of the image are preserved, which is essential for HDR effectiveness.
  3. Image Signal Processor (ISP):

    • Modern ISPs (like those from Qualcomm) are designed specifically for processing high dynamic range images. They provide the necessary speed and efficiency for aligning and merging multiple exposures, applying noise reduction, and other adjustments in real time. //所以, 我们会看到打开HDR的拍照,拍照时间会加长.

Software Contributions

  1. Image Processing Algorithms:

    • Software handles the critical task of merging photos taken at different exposures. Advanced algorithms ensure that bright and dark areas are represented well without looking unnatural. //关于算法 , 比较简单的几个例子:Scene Detection Algorithm/HDR Merging Algorithm/Noise Reduction Algorithm/Face Detection Algorithm/Image Stabilization Algorithm/
    • Tone mapping is typically handled by software, which adjusts the image to fit within display capabilities while preserving the HDR effect.
  2. Machine Learning and Optimization:

    • Many modern smartphones leverage machine learning algorithms to enhance HDR performance. These can help in recognizing scenes and applying HDR settings accordingly, improving the overall quality and functionality.
  3. User Interface and Controls:

    • Software defines how users interact with HDR functionalities. Features such as automatic HDR mode detection or manual controls can significantly impact the user experience and the resulting image.

Conclusion: Which Contributes More?

  • Balance: The contribution of hardware versus software to HDR results is often balanced, but the importance of each can vary by device.
  • Quality Hardware: The most sophisticated software will struggle to produce great HDR images if the hardware limitations are too significant. High-quality sensors and ISPs are essential for capturing the data needed for effective HDR processing.
  • Advanced Software: Conversely, even with great hardware, poorly designed software can lead to less-than-ideal HDR results. Effective algorithms and processing techniques are critical to fully exploit the capabilities of the hardware.

In summary, achieving exceptional HDR results is best accomplished with a synergy between high-quality hardware and advanced software. Each needs to complement the other to deliver the best possible imaging performance.

HDR中的曝光控制Samsung Smartphones

Exposure Control in HDR on Samsung Smartphones

  1. Scene Analysis:

    • When a user activates the HDR mode, the camera first performs an analysis of the scene. It evaluates the lighting conditions, identifying areas with extreme brightness and deep shadows.
    • This analysis includes checking for highlights (bright areas) and shadows (dark areas) to determine the necessary exposure settings.
  2. Automatic Exposure Bracketing (AEB):

    • Upon determining the scene's dynamic range, Samsung's camera module uses Automatic Exposure Bracketing (AEB) to capture multiple images with different exposure levels: //通常就是有三组曝光参数喽?
      • Low Exposure: Focuses on preserving details in the bright areas to avoid overexposure (like clouds or sun).
      • Standard Exposure: Captures the image as it would normally appear, balancing light and dark areas.
      • High Exposure: Aims to capture detail in the darker areas that might be lost in a standard exposure.
  3. Exposure Settings Adjustment:

    • Shutter Speed: The camera dynamically adjusts the shutter speed based on the light level detected. A faster shutter speed is used for low-exposure shots, while a slower shutter speed is applied for high-exposure shots.
    • Aperture and ISO: Although the aperture is typically fixed in smartphone cameras, ISO sensitivity can be adjusted to either increase or decrease the camera sensor's sensitivity to light, thus impacting exposure levels.
    • 还有其它的部件参与吗? 例如ISP的gain? 先提个疑问这里. 
      • 注意ISP的gain调整是针对数字信号而非模拟信号.(如果说出了,请comment)
  4. Rapid Image Capture:

    • The camera captures the three images—low, standard, and high exposures—in quick succession, minimizing movement or changes in the scene during the capture.
    • Advanced sensors and image stabilization technologies (such as Optical Image Stabilization) help ensure that the images are aligned even if there are slight movements.
  5. Image Alignment and Merging:

    • After the images are captured, Samsung's image processing algorithms step in:
      • Alignment: The software aligns the images to correct any slight shifts that may have occurred during the sequential capture process.
      • Merging and Tone Mapping: The best parts of each exposure are merged to create a final HDR image. This process can involve complex tone-mapping algorithms that enhance details in both the highlights and shadows, ensuring a balanced look that retains natural colors.
  6. Real-Time Processing:

    • Many of Samsung's recent smartphones employ powerful processors and image signal processors (ISPs) that allow for real-time HDR processing. This means users can see the effects of HDR before capturing the final image.

Example of HDR Exposure Management

For instance, if a user is taking a photo of a sunset with a dark foreground:

  • Low Exposure: The camera captures the highlights of the sky, ensuring the vibrant colors aren’t washed out.
  • Standard Exposure: Captures a balanced view of the scene with both the sunset and the foreground, but some details may be lost in either the highlights or shadows.
  • High Exposure: Captures more detail in the shadow area (like trees or objects in front), which would otherwise appear too dark.

The final HDR image combines these exposures, resulting in a photo that captures the vivid colors of the sunset while maintaining clarity in the foreground objects.

Conclusion

Samsung smartphones effectively control exposure under HDR conditions through a meticulous process of scene analysis, AEB, quick image capture, alignment, and merging, all facilitated by advanced hardware and software. This allows users to take stunning photos even in challenging lighting scenarios.

Snsor analog gain and ISP gain

Sensor Analog Gain

1. Basic Concept

  • Sensor analog gain is a fundamental adjustment mechanism at the physical sensor level. When light hits the photosensitive elements (pixels) of an image sensor, it generates an electrical charge proportional to the amount of light received. The analog gain amplifies this electrical charge before it is converted into a digital signal. //sensor的模拟gain是放大的模拟电荷信号//
2. Working Principle

  • Amplification Process: After the light is converted into an electrical signal within the sensor, the analog gain circuit multiplies this electrical signal by a certain factor. For example, if the analog gain is set to 2x, the output electrical signal will be twice as large as the original signal generated by the light.
  • Impact on Signal and Noise: Since it amplifies the electrical signal at an early stage, it amplifies both the useful signal (representing the image information) and the noise. As the analog gain increases, the noise level in the image also tends to increase. This is because noise is an inherent part of the electrical signal generation and amplification process in the sensor. //观察发现,有些产品的模拟gain一直都是调到最大的?为什么?不担心噪声吗?
3. Application Scenarios

  • Low - light Conditions: In low - light environments where the amount of light reaching the sensor is limited, increasing the analog gain can make the image brighter. However, due to the increase in noise, there is a trade - off between brightness and image quality. For example, when shooting at night without additional lighting, the camera may increase the analog gain to capture a visible image, but the image may appear grainy.

ISP Gain

1. Basic Concept

  • ISP gain is applied to the digital image data after the analog - to - digital conversion (ADC) process. The Image Signal Processor (ISP) is responsible for processing the digital image data received from the sensor. The ISP gain is used to adjust the brightness of the digital image by multiplying the pixel values.
2. Working Principle

  • Digital Signal Processing: Once the sensor converts the analog electrical signal into a digital value, the ISP can adjust these digital values. For example, if the ISP gain is set to 1.5x, each pixel value in the digital image will be multiplied by 1.5. This effectively increases the brightness of the image.
  • Noise Characteristics: Compared to sensor analog gain, ISP gain has a different impact on noise. Since it operates on the digital data, it does not amplify the inherent sensor noise in the same way as analog gain. However, increasing the ISP gain too much can make the existing noise more visible, and it may also introduce artifacts such as banding or color distortion in the image.//数字增益会导致图片中出现带状伪影问题和颜色畸变(色彩失真)问题? 有哪些例子?
3. Application Scenarios

  • Fine - tuning Exposure: ISP gain is often used as a supplementary means for exposure adjustment. After the sensor has set its shutter speed and analog gain, if the image still needs a small adjustment in brightness, the ISP gain can be used to fine - tune the exposure without significantly increasing the noise compared to further increasing the analog gain. For example, in a scene where the overall exposure is close to the desired level but slightly underexposed, the ISP can apply a small gain to brighten the image.
  • Combined with Other ISP Functions: The ISP gain can work in conjunction with other ISP functions such as white balance, color correction, and noise reduction. For example, while increasing the ISP gain to brighten the image, the ISP can also apply noise - reduction algorithms to mitigate the visibility of noise.

ISP Gain 过大导致的问题举例

Banding Artifacts

Example Scenario

  • Gradient Background: Imagine you're taking a photo of a clear sky that has a smooth gradient from light blue at the horizon to a darker blue at the zenith. When the ISP gain is set too high, instead of a smooth gradient, you might see distinct bands or stripes of different shades of blue across the sky. These bands are visible as sudden changes in brightness or color within what should be a continuous and smooth transition. //简单点说就是不够细粒, 跨度大了,扯到了.
Cause

  • Limited Bit Depth and Quantization: Digital images are represented by a certain number of bits per pixel. When the ISP applies a high gain, the range of pixel values is stretched. If the bit depth is insufficient to handle this stretched range smoothly, the pixel values get quantized into discrete levels. For example, if the original pixel values in a gradient range from 0 - 255 and the ISP gain doubles the values, the new range should be 0 - 510. But if the image is stored in an 8 - bit format (which can only represent values from 0 - 255), the values have to be compressed back into this limited range. This compression leads to the formation of bands where similar - valued pixels are grouped together.

Color Distortion

Example Scenario

  • Skin Tones in Portrait Photography: When shooting a portrait in low - light conditions and relying too much on ISP gain to brighten the image, the subject's skin tones can become distorted. Instead of the natural, healthy - looking skin color, it might appear overly red, green, or have an unnatural tint. For instance, the skin might take on a greenish hue, making the person look unwell.
Cause

  • Non - Linear Response and Color Balance Shift: The ISP processes different color channels (red, green, and blue) separately when applying gain. Each color channel may have a slightly different response to the gain adjustment. At high gain levels, these differences can become more pronounced, causing a shift in the color balance. Additionally, the noise in each color channel can be amplified differently, further contributing to color distortion. For example, if the blue channel has more noise and is amplified more aggressively by the ISP gain, it can make the overall image look bluer or introduce a bluish tint to the colors.
Example in a Landscape Image

  • Foliage Colors: In a landscape photo with lots of green foliage, excessive ISP gain can make the green leaves look either too bright and washed - out or develop a strange yellow or brownish tint. This is because the gain adjustment disrupts the natural color relationships between the different wavelengths of light that make up the green color in the image.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值