韩雪1, 周骛1, 蔡天意1, 徐喜庆2, 裴昌蓉2, 蔡小舒1
1. 上海理工大学,a. 能源与动力工程学院,b. 上海市动力工程多相流动与传热重点实验室,上海200093;2. 中国石油大庆油田有限责任公司,a. 勘探开发研究院,b. 多资源协同陆相页岩油绿色开采全国重点实验室,黑龙江 大庆163712
引用格式:
韩雪, 周骛, 蔡天意, 等. 彩色图像边缘伪影的识别及去除方法[J]. 中国粉体技术, 2026, 32(2): 1-16.
HAN Xue, ZHOU Wu, CAI Tianyi, et al. Identification and removal methods of edge artifacts in color images[J]. China Powder Science and Technology, 2026, 32(2): 1-16.
DOI:10.13732/j.issn.1008-5548.2026.02.012
收稿日期: 2024-12-30, 修回日期: 2025-04-26, 上线日期: 2025-09-17。
基金项目: 国家自然科学基金项目, 编号: 52376163; 上海市科学技术委员会启明星培育(扬帆)计划项目, 编号: 22YF1429600。
第一作者简介: 韩雪(1998—),女,硕士生,研究方向为彩色图像的颗粒测量。E-mail:hx_0117@163.com。
通信作者简介: 周骛(1986—),女,教授,博士,博士生导师,研究方向为颗粒与两相流测量。E-mail:zhouwu@usst.edu.cn。
摘要: 【目的】 为了识别及去除彩色图像的边缘伪影像素,提高颜色表征的准确性,提出一种识别并去除彩色图像边缘伪影的方法,为国际标准的制定奠定基础。【方法】 在MATLAB软件中构建模拟生成彩色图像的仿真程序,将黑色不透光的仿真颗粒作为研究对象,模拟在彩色滤色阵列(color filter array,CFA)中Bayer模式下由彩色图像的原始格式(RAW)图像向RGB(red, green and blue channels,RGB)格式图像转化的过程;搭建彩色图像拍摄装置,获得圆点标定板图像后标定黑色圆点的实际大小和颜色,研究彩色图像边缘伪影的形成规律,采用仿真与实验相结合方法分别研究彩色图像的6种去马赛克插值算法以及镜头色散成像对伪影像素个数的影响;采用红、蓝聚苯乙烯颗粒和黄、白氨咖黄敏药物颗粒作为应用对象,拍摄颗粒并获取颗粒彩色图像,然后分析去除伪影前、后颜色矩和色品坐标图的变化,验证识别和去除伪影像素的方法在拍摄不同颗粒彩色图像时的适用性和通用性。【结果】 6种插值算法对转换生成的RGB图像的平均色差值、最大色差值和色差众数值均有不同程度的影响,采用仿真法生成的彩色图像的边缘伪影像素个数为2~3,采用拍摄方法获得的黑色圆点图像的边缘伪影像素个数大于3。当去除伪影像素个数为5时,标定板黑色圆点图像中的R、G、B通道值的标准差都小于0.01,接近背景噪声水平,伪影已被有效去除,颜色波动降至最低。去除边缘伪影像素个数为5时,聚苯乙烯和氨咖黄敏药物的颗粒图像的颜色矩中的一阶矩都有所增大,二、三阶矩均有所减小,颗粒像素点在色品坐标图中的分布区域明显减小,坐标点聚集性增强,准确反映了颗粒的真实颜色。【结论】 边缘伪影像素的识别与去除方法可以减少彩色图像中的统计色差,使彩色图像的整体亮度更接近实物颜色的真实值,颜色的波动性减小,亮暗色比例均衡,实现了彩色图像的颜色保真与形态保真的双重目标。
关键词: 彩色图像; 边缘伪影; 插值算法; 色差; 颜色矩; 色品坐标
Abstract
Objective Color images are typically processed using the Bayer pattern in the color filter array (CFA) during image acquisition. However, this approach often generates a band of artifact pixels around image edges, causing colors deviation from the actual objects. To address this issue, this paper proposes a method for identifying and removing edge artifact pixels in color images, thereby improving the accuracy of color representation for real-world objects and laying the foundation for future international standards.
Methods A simulation program for generating color images was constructed in Matlab software. Opaque black simulated particles were used as the research object to mimic the conversion process from raw (RAW) to RGB (red, green and blue channels) format images under the Bayer filter within the CFA. A color image acquisition setup was established to capture images of a dot calibration board, and the actual size and color of the black dots were calibrated to investigate the formation mechanism of edge artifacts in color images. A combined approach of simulations and experiments was adopted to examine the impact of 6 demosaicing interpolation algorithms and lens chromatic aberration on the number of artifact pixels in color images. To validate this method, red and blue polystyrene particles and yellow and white paracetamol-caffeine-artificial cow-bezoar-chlorphenamine maleate granules were used as application subjects. Color images of these particles were captured, and changes in color momentsand chromaticity coordinates before and after artifact removal were analyzed. It demonstrated the method’s applicability and universality across different particle types.
Results and Discussion In simulated color images, the 6 demosaicing interpolation algorithms generated ftom 2 to 3 edge artifact pixels. The number of edge artifact pixels in the captured images of black dots exceeded 3. These 6 interpolation algorithms exhibited different degrees of influence on the mean, maximum, and modal values of color differences in the converted RGB color images. When 5 edge artifact pixels were removed, the standard deviations of the R, G, and B channel values in the black dot images all fell below 0.01, approaching background noise levels. The removal of artifact pixels effectively removed the artifacts, and color fluctuations were minimized. Upon the removal of 5 edge artifact pixels, the first-order moments in the color moments of the particle images for both polystyrene and paracetamol-caffeine-artificial cow-bezoar-chlorphenamine maleate granules increased. However, the second and third-order moments decreased. The distribution area of particle pixels in the chromaticity coordinate diagrams was significantly reduced, and the clustering of coordinate points was enhanced. These results accurately reflected the true colors of the particles.
Conclusion The edge artifact pixel identification and removal methods effectively reduce statistical color differences in color images. The overall luminance of particle images is closer to their true values, the color fluctuation is decreased, and the balance of light and dark tones is achieved. The dual goals of color fidelity and morphological fidelity are achieved.
Keywords: color image; edge artifact; interpolation algorithm; color difference; color moment; chromaticity coordinate
参考文献(References)
[1]SAFNA ASIQ M S, EMMANUEL W S. Efficient colour filter array demosaicking with prior error reduction[J]. Journal of King Saud University: Computer and Information Sciences, 2022, 34(4): 1191-1199.
[2]ZHANG Y Y, WANG X L, SHI G, et al. Anti-aliasing and anti-color-artifact demosaicing for high-resolution CMOS image sensor[J]. IEEE Transactions on Circuits and Systems I: Regular Papers, 2023, 70(12): 4928-4937.
[3]李遂贤, 李强, 贺金平, 等. 多光谱彩色成像中高斯型滤色器的通道数确定[J]. 光学学报, 2024, 44(3): 84-94.
LI S X, LI Q, HE J P, et al. Optimal number of spectral channels for Gaussian filter sets in multispectral color imaging[J]. Acta Optica Sinica, 2024, 44(3): 84-94.
[4]SHEN Z X, ZHOU S H, LI X N, et al. Liquid crystal integrated metalens with tunable chromatic aberration[J]. Advanced Photonics, 2020, 2(3): 036002.
[5]DOU H, WANG L, REN G, et al. A light-mixing liquid crystal lens-like cell to decrease color shift and tune brightness for displays[J]. Crystals, 2022, 12(2): 213.
[6]魏凌云, 孙帮勇. Bayer阵列图像去马赛克算法综述[J]. 中国图象图形学报, 2022, 27(9): 2683-2696.
WEI L Y, SUN B Y. The review of demosaicing methods for Bayer color filter array image[J]. Journal of Image and Graphics, 2022, 27(9): 2683-2696.
[7]TAKEUCHI M, SAKAMOTO Y, YOKOYAMA R, et al. Gamut-extension methods considering color information restoration[J]. IEEE Access, 2019, 7: 80146-80158.
[8]ZHAO F, ZHANG Z, LI H N, et al. A pseudo-color image-based cylindrical object surface text detection method[J]. The Visual Computer, 2024, 40(9): 6639-6654.
[9]CHEN Z, XI X Q, TAN S Y, et al. Research status and prospect of ring artifact correction method for X-ray CT[J]. Proceedings of SPIE: The International Society for Optical Engineering, 2024, 13183: 1318314.
[10]ZHOU B, LIU Z Q, CHEN X C, et al. True-color and super-resolution imaging using an optical axis shiftable liquid crystal lens[J]. Applied Optics, 2024, 63(2): 415-422.
[11]MORÓN HERNÁNDEZ D C, DÍAZ GONZÁLEZ F A, TRIANA CORREA J S, et al. Quality evaluation of chromatic interpolation algorithms for image acquisition system[J]. Journal of Aerospace Technology and Management, 2016, 8(3): 339-351.
[12]ZHAO W G, WANG L Y, ZHANG Z X, et al. Quadratic interpolation optimization (QIO): a new optimization algorithm based on generalized quadratic interpolation and its applications to real-world engineering problems[J]. Computer Methods in Applied Mechanics and Engineering, 2023, 417: 116446.
[13]PEKKUCUKSEN I, ALTUNBASAK Y. Multiscale gradients-based color filter array interpolation[J]. IEEE Transactions on Image Processing, 2013, 22(1): 157-165.
[14]KHAN S, LEE D H, KHAN M A, et al. Image interpolation via gradient correlation-based edge direction estimation[J]. Scientific Programming, 2020: 5763837.
[15]张俊超, 陈溅来, 罗海波, 等. 基于张量非负稀疏分解的偏振图像插值算法[J]. 光学学报, 2021, 41(14): 1411001.
ZHANG J C, CHEN J L, LUO H B, et al. Polarization image interpolation algorithm via tensor non-negative sparse factorization[J]. Acta Optica Sinica, 2021, 41(14): 1411001.
[16]严忻恺, 丁晟. 一种自适应图像插值算法及加速引擎的协同设计[J]. 电子与信息学报, 2023, 45(9): 3284-3294.
YAN X K, DING S. Adaptive image interpolation algorithm and acceleration engine co-design[J]. Journal of Electronics Information Technology, 2023, 45(9): 3284-3294.
[17]吴鑫, 徐宝腾, 刘家林, 等. 基于RGB-NIR滤波阵列的引入权重系数的加权引导滤波去马赛克方法[J]. 光子学报,2024, 53(9): 47-57.
WU X, XU B T, LIU J L, et al. A weighted guide filtering demosaicing method with weighting coefficients based on RGB-NIR filter array[J]. Acta Photonica Sinica, 2024, 53(9): 47-57.
[18]EBOLI T. Fast chromatic aberration correction with 1D filters[J]. Image Processing on Line, 2023, 13: 198-214.
[19]EVDOKIMOVA V, PODLIPNOV V, IVLIEV N, et al. Hybrid refractive-diffractive lens with reduced chromatic and geometric aberrations and learned image reconstruction[J]. Sensors, 2023, 23(1): 415.
[20]LYU J D, WANG Y J, XU L M, et al. A method to obtain the near-large fruit from apple image in orchard for single-arm apple harvesting robot[J]. Scientia Horticulturae, 2019, 257: 108758.
[21]LUO M R, XU Q, POINTER M, et al. A comprehensive test of colour-difference formulae and uniform colour spaces using available visual datasets[J]. Color Research Application, 2023, 48(3): 267-282.
[22]黄作杰, 周骛, 徐喜庆, 等. 颗粒图像的颜色校准与表征[J]. 中国粉体技术, 2024, 30(4): 104-114.
HUANG Z J, ZHOU W, XU X Q, et al. Color calibration and characterization of particle images[J]. China Powder Scienceand Technology, 2024, 30(4): 104-114.
[23]HASSAN G, HOSNY K M, FAROUK R M, et al. New set of invariant quaternion krawtchouk moments for color image representation and recognition[J]. International Journal of Image and Graphics, 2022, 22(4): 2250037.