matlab图像恢复遮挡物图片,Matlab将图像恢复为原始颜色-程序员宅基地

技术标签: matlab图像恢复遮挡物图片  

I asked it in the past, someone suggested me to use MACBETH but I don't have enough money for having it :/

7d9d843712b5a279e5deb0894904ea10.png

So before I photographed, I've added 3 circles to the image to be places in the image: the first circle is red with RGB of [255 0 0], the second is green circle with RGB of [0 255 0] and the third is blue [0 0 255]. Thus I can see the change about the pixels average of each of them and fix the whole image by this change.

I have all the pixels of each circle. I made average of the pixels and I got the next thing:

The red circle's average RGB of its all contained pixels is [243 15 26].

the green circle's average RGB of its all contained pixels is [29 235 56].

and about the blue circle it is [14 33 250].

how can I fix the colors of each pixel in the image by the result of the new red\green\blue circles' RGB?

解决方案

If you assume a linear color mapping, you can construct a linear system that describes the change from original colors, e.g. (0, 0, 255) to observed colors, eg. (14, 33, 250).

Basically, y = A*x, where x is the original colors, y is the observed colors, A is the transformation matrix.

Once you calculated A, you can invert it to obtain the transform needed to go from y to x. You can then apply A^(-1) on all pixels for linear color correction.

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_39551996/article/details/118804073

智能推荐

mysql capi函数详解_技术分享|MySQLCAPI参数MYSQL_OPT_READ_TIMEOUT的一些行为分析-程序员宅基地

文章浏览阅读208次。作者:戴岳兵MYSQL_OPT_READ_TIMEOUT 是 MySQL c api 客户端中用来设置读取超时时间的参数。在 MySQL 的官方文档中,该参数的描述是这样的:MYSQL_OPT_READ_TIMEOUT (argument type: unsigned int *)The timeout in seconds for each attempt to read from the se..._mysqli_opt_read_timeout_us

Spark系列文章 Spark3部署,java实现Pi、WordCount程序,任务部署到yarn_java实现spark pi任务-程序员宅基地

文章浏览阅读885次。Spark系列文章 程序部署到yarnApache Spark 部署Spark下载上传,解压配置Spark使用yarn做资源管理让我们先把yarn可调度的资源范围调大一些运行一个example检测配置的情况java实现Spark程序引入依赖码代码:写一遍Pijava实现WordCount打包上传到服务器运行异常情况的处理查看job运行状况成功的输出环境组件版本CentOS..._java实现spark pi任务

线段树--hotel usaco feb08gold_usaco2008feb-gold hotel-程序员宅基地

文章浏览阅读632次。【Usaco Feb08 Gold】旅馆Time Limit:10000MS Memory Limit:65536KCase Time Limit:1000MSDescription奶牛们最近的旅游计划,是到苏必利尔湖畔,享受那里的湖光山色,以及明媚的阳光。作为整个旅游的策划者和负责人,贝茜选择在湖边的一家著名的旅馆住宿。这个巨大的旅馆一共有N (1 贝茜一行,以及其他慕_usaco2008feb-gold hotel

windows下使用keytool生成ssl自生成证书并在tomcat7中配置-程序员宅基地

文章浏览阅读4k次。一:生成ssl证书首先需要生成一个ssl证书,直接打开cmd,默认已经配置jdk的环境变量,输入:keytool -genkey -alias tomcat -keyalg RSA -keystore目录/tomcat.keystore其中-genkey 指生成keystore ,-alias 指别名,-keyalg 指使用的加密算法,-keystore 后面跟上生成的keys

java多表多字段的模糊匹配_Java中实现对表中多个字段的模糊查询(Oracle)-程序员宅基地

文章浏览阅读949次。public UserVO fuzzyQuery(String keyword) {UserVO user=null;ResultSet rs = null;PreparedStatement prep = null;try {String sql="select * from users where status=1 and (username like '%'||'"+keyword+"'||..._java需要通过某一个输入值模糊搜索某一张表中所有的字段,如何实现

Elsevier期刊LaTeX投稿过程中注意的问题_supplementary material for on-line publication onl-程序员宅基地

文章浏览阅读1.2w次,点赞13次,收藏35次。Elsevier期刊LaTeX投稿过程中注意的问题上传文件神奇的问题上传文件可以上传整个文件的压缩包,上传后会自动解压成单个文件。【注意1】:无法上传嵌套的文件夹,因此所有文件包括.tex和.pdf都应放置在同一文件夹中,同时注意修改图片引用路径。【注意2】:.tex文件选成Manuscript类型,elsarticle.cls选成Supplementary material for on-line publication only,(似乎可以不用上传elsarticle.cls)神奇的问题错_supplementary material for on-line publication only

随便推点

TLS 报文分析记录_tlsv报文-程序员宅基地

文章浏览阅读640次。struct {ProtocolVersion client_version;Random random;SessionID session_id;CipherSuite cipher_suites;CompressionMethod compression_methods;select (extensions_present_tlsv报文

Spring+SpringMVC+MyBatisPlus详解_springmvc mybatisplus-程序员宅基地

文章浏览阅读2.7k次,点赞5次,收藏27次。前言:学习过程中了解到MyBatis-Plus 功能非常强大,于是乎学了起来,结合已有框架进行整合,但是发现好多博客都是与SpringBoot进行整合的。所以总结一个与spring+SpringMVC整合详细笔记供大家参考。后续也会总结一个与springBoot的整合,毕竟SpringBoot更为主流。第一步:搭建Maven架构、完善项目结构。第二步:在pom.xml文件中导入所需要的依赖<?xml version="1.0" encoding="UTF-8"?><project_springmvc mybatisplus

java see 作用_java – 为什么Eclipse在使用@See引用它时会导入一个类-程序员宅基地

文章浏览阅读313次。为什么Eclipse为Javadoc @see注释的目标类添加导入?如果你通过findbugs或PMD运行它,他们会抱怨它是一个未使用的导入.哪个是正确的?我个人不明白为什么eclipse想要导入它.import java.util.List;/*** @see List*/“链接”也是如此import java.util.List;/*** {@link List}*/有什么想法为什么?解决方法..._elicpse @see

NPOI导入excel-程序员宅基地

文章浏览阅读312次。using NPOI.HSSF.UserModel;using NPOI.SS.UserModel;using NPOI.XSSF.UserModel;using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;using System.Text;usin_npoi导入excel

uniapp 小程序实现中间突起tabbar_uniapptabbar中间凸起怎么写-程序员宅基地

文章浏览阅读5.1k次,点赞4次,收藏24次。先看下效果实现步骤1.先引入uview ui,不会的可以看下我另外一篇文章,写的很详细uniapp 中uview-ui的使用教程https://blog.csdn.net/hu104160112/article/details/120076812?spm=1001.2014.3001.55012.创建tabbar 组件及页面3.pages.json文件中配置{ "easycom": { "autoscan": true, "custom": { "^uni-(.*)": _uniapptabbar中间凸起怎么写

[JavaScript][异步]Promise 构造函数是同步执行还是异步执行,那么 then 方法呢?_js primise 是同步还是异步-程序员宅基地

文章浏览阅读2.3k次,点赞3次,收藏3次。const promise = new Promise((resolve, reject) => { console.log(1) resolve() console.log(2)})promise.then(() => { console.log(3)})console.log(4)执行结果是:1243promise构造函数是同步执行的,then方法是异步执行的..._js primise 是同步还是异步

推荐文章

热门文章

相关标签