English 中文(简体)
什么是MS Office对比算法?
原标题:What is the MS Office contrast algorithm?

有人知道MS Office用什么公式对图像进行对比调整吗?

它看起来像二次函数, 但我无法发现它。

问题回答

不清楚他们使用什么公式。 我怀疑你会发现, 因为没有开源代码, 但这里是我用来做对比调整的代码:

function(im, contrast=10){
   # Get c-value from contrast
   c = (100.0 + contrast) / 100.0
   # Apply the contrast
   im = ((im-0.5)*c)+0.5
   # Cap anything that went outside the bounds of 0 or 1 
   im[im<0] = 0
   im[im>1] = 1
   # Return the image
   return(im)
}

这对我真的很管用

<强 > 注

在此假设您的像素强度值在 0 到 1 的尺度上 。 如果在 255 的尺度上, 更改行 < code>im = (( im-0.5* 255) *c)+ 0.5* 255 im [im>255] = 255

以上函数为 R 语言

祝你好运





相关问题
Resources for Image Recognition

I am looking for a recommendation for an introduction to image processing algorithms (face and shape recognition, etc.) and wondered if anyone had an good recommendations, either for books, ...

Good reference book for digital image processing? [closed]

I am learning digital image processing on my own and would like recomendations on good reference books. If you know of books to definately stay away from that would be useful as well. Thanks

Python Tesseract can t recognize this font

I have this image: I want to read it to a string using python, which I didn t think would be that hard. I came upon tesseract, and then a wrapper for python scripts using tesseract. So I started ...

What s the quickest way to parallelize code?

I have an image processing routine that I believe could be made very parallel very quickly. Each pixel needs to have roughly 2k operations done on it in a way that doesn t depend on the operations ...

Computing object statistics from the second central moments

I m currently working on writing a version of the MATLAB RegionProps function for GNU Octave. I have most of it implemented, but I m still struggling with the implementation of a few parts. I had ...

Viola-Jones face detection claims 180k features

I ve been implementing an adaptation of Viola-Jones face detection algorithm. The technique relies upon placing a subframe of 24x24 pixels within an image, and subsequently placing rectangular ...