史蒂夫与MATLAB图像处理 https://blogs.mathworks.com/steve 史蒂夫·埃丁是一个热情的业余法国号的球员。而且,他开发了图像处理和自1993年以来MathWorks MATLAB软件。史蒂夫合著的书<我> < / i >数字图像处理用MATLAB。 2021年12月29日结婚,18:41:53 + 0000 en - us 每小时 1 https://wordpress.org/?v=4.9.15 SteveOnImageProcessing https://feedburner.google.com 订阅我的雅虎 订阅与Feedly 订阅与SubToMe 与博客订阅订阅 订阅和Netvibes 订阅与片断的浏览器 订阅每日与旋转 可视化out-of-gamut颜色在实验室曲线 https://blogs.mathworks.com/steve/2021/12/29/visualizing-out-of-gamut-colors-in-lab-curve/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/12/29/visualizing-out-of-gamut-colors-in-lab-curve/回应 2021年12月29日结婚,18:40:14 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=5269 < div class = "概览图像“> < img src = " https://blogs.mathworks.com/steve/files/visualizing_out_of_gamut_lab_colors_06.png " class = " img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image“alt = " / > < / div > < p >我今天看一个老帖子,“实验室统一的色彩范围”(09 - 2006年5月——)。我想提供一个更新说明,更容易从实验室转化为RGB颜色现在比…< class = "阅读更多" href = " https://blogs.mathworks.com/steve/2021/12/29/visualizing-out-of-gamut-colors-in-lab-curve/ " >阅读更多> > < / > < / p > < p > < a href = " https://blogs.mathworks.com/steve/2021/12/29/visualizing-out-of-gamut-colors-in-lab-curve/ " >可视化后out-of-gamut颜色在实验室曲线< / >第一次出现在< a href = " https://blogs.mathworks.com/steve " >史蒂夫与MATLAB图像处理< / >。< / p > < div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

I was looking today at an old post, "A Lab-based uniform color scale" (09-May-2006). I wanted to provide an update to illustrate that it is easier to convert from Lab to RGB colors now than it was then. When I reread the original post, though, I realized that I was naive back then about the possibility that constructing a colormap using a path in Lab space could result in out-of-gamut colors when converting to sRGB.After thinking it over, I think I'd like to do two (or maybe three) follow-up posts. The first follow-up post, today, will focus on some ways to visualize where a curve in Lab space goes out-of-gamut for sRGB. Next, I'll explore ways to modify the technique I demonstrated previously in order to avoid out-of-gamut colors.Here is the colormap I showed in the 09-May-2006 post:radius = 50;theta = linspace(0, pi/2, 256).';a = radius * cos(theta);b = radius * sin(theta);L = linspace(0,

...read more >>

https://blogs.mathworks.com/steve/2021/12/29/visualizing-out-of-gamut-colors-in-lab-curve/feed/ 0
峰值,峰值过滤和灰度加权质心 https://blogs.mathworks.com/steve/2021/10/04/peaks-peak-filtering-and-gray-scale-weighted-centroids/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/10/04/peaks-peak-filtering-and-gray-scale-weighted-centroids/的评论 星期一,2021年10月04 20:51:25 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=5001 < div class = "概览图像“> < img src = " https://blogs.mathworks.com/steve/files/locating_broad_peaks_5.png " class = " img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image“alt = " / > < / div > < p >今天,我继续我的最近的主题思考peak-finding图像。当我写第一个(19 - 8月- 2021年),我不知道它会变成一个系列。这可能是最后一次……< class = "阅读更多" href = " https://blogs.mathworks.com/steve/2021/10/04/peaks-peak-filtering-and-gray-scale-weighted-centroids/ " >阅读更多> > < / > < / p > < p > < a href = " https://blogs.mathworks.com/steve/2021/10/04/peaks-peak-filtering-and-gray-scale-weighted-centroids/ " >后峰值,峰值过滤和灰度加权质心< / >第一次出现在< a href = " https://blogs.mathworks.com/steve " >史蒂夫与MATLAB图像处理< / >。< / p > < div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

Today, I'm continuing my recent theme of thinking about peak-finding in images. When I wrote the first one (19-Aug-2021), I didn't realize it was going to turn into a series. This might be the last one—but no promises!My previous post (17-Sep-2021) was based on 1-D examples. Today's post focuses on an image example (in 2-D), and it connects to using regionprops to compute gray-weighted centroids of peaks. I'll also throw in some 3-D surface visualization, just for fun. Here is today's image:url = "https://blogs.mathworks.com/steve/files/snowflakes2.png";A = imread(url);imshow(A)I'd like to see if we can focus algorithmically on these white blobby things (that's a technical term that I learned in engineering school). First, let's try computing the

...read more >>

https://blogs.mathworks.com/steve/2021/10/04/peaks-peak-filtering-and-gray-scale-weighted-centroids/feed/ 5
小峰抑制H-Maxima变换 https://blogs.mathworks.com/steve/2021/09/17/small-peak-suppression-with-the-h-maxima-transform/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/09/17/small-peak-suppression-with-the-h-maxima-transform/的评论 星期五,2021年9月17日19:18:39 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=4839

Last time, I introduced the idea of a regional maximum. Today, I want to add a concept that makes the regional maximum more useful: suppressing very small local maxima, possibly present only because... read more >>

The post Small-Peak Suppression with the H-Maxima Transform first appeared on Steve on Image Processing with MATLAB.

< div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " https://blogs.mathworks.com/steve/files/explaining_hmax_1 - 2. - png " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

Last time, I introduced the idea of a regional maximum. Today, I want to add a concept that makes the regional maximum more useful: suppressing very small local maxima, possibly present only because of noise, that are are unimportant, before identifying the regional maxima. This "small peak suppression" can be accomplished using something called the h-maxima transform. The functions of interest today: imregionalmax, imhmax, imextendedmax, imregionalmin, imhmin, and imextendedmin. Let's get there by starting once again with the definition of regional maximum: a connected component of pixels with a constant value h, where every pixel that is neighbor to that connected component has a value that is lower than h. I'd like to elaborate on that using a one-dimensional example.y = peaksAndPlateaus;x = 1:length(y);plot(x,y)axis([-5 105 0 120])grid onI'll use dilation and

...read more >>

https://blogs.mathworks.com/steve/2021/09/17/small-peak-suppression-with-the-h-maxima-transform/feed/ 3
局部极大值区域极大值,函数imregionalmax https://blogs.mathworks.com/steve/2021/08/19/local-maxima-regional-maxima-and-the-function-imregionalmax/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/08/19/local-maxima-regional-maxima-and-the-function-imregionalmax/回应 星期四,2021年8月19日21:02:18 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=4759 < div class = "概览图像“> < img src = " https://blogs.mathworks.com/steve/files/local_max_regional_max_imregionalmax_1.png " class = " img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image“alt = " / > < / div > < p >最近算法讨论图像处理工具箱开发团队让我想起很久以前我最初想做的事:解释imregionalmax ....和一些相关的操作< class = "阅读更多" href = " https://blogs.mathworks.com/steve/2021/08/19/local-maxima-regional-maxima-and-the-function-imregionalmax/ " >阅读更多> > < / > < / p > < p > < a href = " https://blogs.mathworks.com/steve/2021/08/19/local-maxima-regional-maxima-and-the-function-imregionalmax/ " >后局部极大值区域极大值,函数imregionalmax < / >第一次出现在< a href = " https://blogs.mathworks.com/steve " >史蒂夫与MATLAB图像处理< / >。< / p > < div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " https://blogs.mathworks.com/steve/files/explaining_hmax_1 - 2. - png " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

A recent algorithm discussion on the Image Processing Toolbox development team reminded me of something I originally wanted to do a long time ago: explain imregionalmax and some related operations. (I guess I got sidetracked.)For this explanation, I'll use the following sample image:P = sampleImage;imshow(P)Note that this image has a number of constant-valued rings. One might call these regions "plateaus." Here is a cross-section of the pixel values:p256 = P(256,:);plot(p256)axis([1 500 0 300])text(250,255,"plateau",HorizontalAlignment = "center", ... VerticalAlignment = "bottom")text(345,204,"plateau",HorizontalAlignment = "center", ... VerticalAlignment = "bottom")text(415,153,"plateau",HorizontalAlignment = "center", ... VerticalAlignment = "bottom")text(471,102,"plateau",HorizontalAlignment = "center", ... VerticalAlignment = "bottom")Local maximaIn image processing, the usual definition of a local maximum is that a pixel is considered to be a local maximum if and only

...read more >>

https://blogs.mathworks.com/steve/2021/08/19/local-maxima-regional-maxima-and-the-function-imregionalmax/feed/ 0
使用更少的meshgrid repmat https://blogs.mathworks.com/steve/2021/07/26/use-less-meshgrid-and-repmat/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/07/26/use-less-meshgrid-and-repmat/的评论 星期一,2021年7月26日20:47:47 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=4721 < div class = "概览图像“> < img src = " https://blogs.mathworks.com/steve/files/using_meshgrid_repmat_less_2.png " class = " img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image“alt = " / > < / div > < p > meshgrid功能和MATLAB repmat有着悠久而丰富的历史。今天,我将试着说服你不使用它们。meshgridThe meshgrid通常用于取一个矢量函数……< class = "阅读更多" href = " https://blogs.mathworks.com/steve/2021/07/26/use-less-meshgrid-and-repmat/ " >阅读更多> > < / > < / p > < p > < a href = " https://blogs.mathworks.com/steve/2021/07/26/use-less-meshgrid-and-repmat/ " >后使用更少的meshgrid和repmat < / >第一次出现在< a href = " https://blogs.mathworks.com/steve " >史蒂夫与MATLAB图像处理< / >。< / p > < div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " https://blogs.mathworks.com/steve/files/explaining_hmax_1 - 2. - png " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

The functions meshgrid and repmat have a long and rich history in MATLAB. Today, I'll try to convince you to use them less.meshgridThe function meshgrid is typically used to take a vector of x-coordinates and a vector of y-coordinates and turn them into two matrices, X and Y, that can be used to compute a function of two variables. Here is a small example.x = [0 1 2];y = [0 10 20 30];[X,Y] = meshgrid(x,y)X = 4×3 0 1 2 0 1 2 0 1 2 0 1 2 Y = 4×3 0 0 0 10 10 10 20 20 20 30 30 30 Here is another example that illustrates how meshgrid is typically used. The example, taken from the 2nd edition (2009) of Digital Image Processing Using MATLAB, constructs a surface plot of the function $ f(x,y) = xe^{-(x^2 + y^2)} $.x = -2:0.1:2;y = -2:0.1:2;[X,Y] = meshgrid(x,y);Z = X.*exp(-(X.^2 + Y.^2));surf(Z)The variables x and y are vectors, and the variables X and Y are matrices:whos x y X Y Name

...read more >>

https://blogs.mathworks.com/steve/2021/07/26/use-less-meshgrid-and-repmat/feed/ 2
使用imbinarize阈值灰度图像 https://blogs.mathworks.com/steve/2021/06/17/use-imbinarize-to-threshold-gray-scale-images/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/06/17/use-imbinarize-to-threshold-gray-scale-images/回应 星期四,2021年6月17日14:27:40 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=4655 < div class = "概览图像“> < img src = " https://blogs.mathworks.com/steve/files/tracing_george_updated_5.png " class = " img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image“alt = " / > < / div > < p >今天,我想说服你使用imbinarize代替im2bw。背景:最近我看到一些数据表明许多图像处理工具箱用户仍使用im2bw,旧的功能……< class = "阅读更多" href = " https://blogs.mathworks.com/steve/2021/06/17/use-imbinarize-to-threshold-gray-scale-images/ " >阅读更多> > < / > < / p > < p >的< a href = " https://blogs.mathworks.com/steve/2021/06/17/use-imbinarize-to-threshold-gray-scale-images/ " > < / >使用imbinarize阈值灰度图像首先出现在< a href = " https://blogs.mathworks.com/steve " >史蒂夫与MATLAB图像处理< / >。< / p > < div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " https://blogs.mathworks.com/steve/files/explaining_hmax_1 - 2. - png " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

Today, I want to convince you to use imbinarize instead of im2bw.Background: I recently saw some data suggesting that many Image Processing Toolbox users are still using im2bw, an old function that dates back to the original toolbox release in 1993. We recommend using the newer function, imbinarize, because it saves a step in the most common scenario, and because it offers additional flexibility if you need it.I'll explain by updating an old blog post topic called "Tracing George," in which I try to extract the curve shown in the following image:url = 'https://blogs.mathworks.com/images/steve/36/george.jpg';I = imread(url);imshow(I)I call this "George." I created George originally for some examples and diagrams in the book Digital Image Processing Using MATLAB. I found at some point that I needed to reproduce the outline curve, but I

...read more >>

https://blogs.mathworks.com/steve/2021/06/17/use-imbinarize-to-threshold-gray-scale-images/feed/ 0
南目击 https://blogs.mathworks.com/steve/2021/05/27/nan-sightings/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/05/27/nan-sightings/的评论 星期四,2021年5月27日18:33:58 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=4564 < div class = "概览图像“> < img src = " https://blogs.mathworks.com/steve/files/nan-metronome.png " class = " img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image“alt = " / > < / div > < p >我们中的一些人在MathWorks想分享我们的“南目击事件”。Here is an example to show what I mean. This is a screenshot of the tuner/metronome app that I use when practicing music. One day, I was a... read more >>

The post NaN Sightings first appeared on Steve on Image Processing with MATLAB.

< div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " https://blogs.mathworks.com/steve/files/explaining_hmax_1 - 2. - png " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

Some of us at MathWorks like to share our "NaN sightings." Here is an example to show what I mean. This is a screenshot of the tuner/metronome app that I use when practicing music. One day, I was a bit startled when the app suddenly decided that my metronome tempo was -NaN. (Am I playing too fast? No. Am I playing too slow? No. Am I playing at just the right speed? Also no.)

Here's another example spotted by a fellow MathWorker. In a town near my home, you can apparently buy a lawn tractor that has been driven NaN miles.

And a third MathWorker was helping a family member file their taxes and received this surprising summary of the results.

If you spot some amusing NaNs in the wild, let us

...read more >>

https://blogs.mathworks.com/steve/2021/05/27/nan-sightings/feed/ 2
如何使用一个定制的插值与imresize内核 https://blogs.mathworks.com/steve/2021/05/13/how-to-use-a-custom-interpolation-kernel-with-imresize/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/05/13/how-to-use-a-custom-interpolation-kernel-with-imresize/的评论 2021年5月13日星期四21:09:40 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=4500

Recently, I was talking with MathWorks writer Jessica Bernier about the reference page for the imresize function. Jessica pointed out that we don't have an example that shows how to use your own... read more >>

The post How to Use a Custom Interpolation Kernel with imresize first appeared on Steve on Image Processing with MATLAB.

< div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " https://blogs.mathworks.com/steve/files/explaining_hmax_1 - 2. - png " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

Recently, I was talking with MathWorks writer Jessica Bernier about the reference page for the imresize function. Jessica pointed out that we don't have an example that shows how to use your own interpolation kernel. In today's post, I'll compare the supported interpolation kernels on a sample image, and then I'll show you how to use your own kernel.The different methods supported by imresize, including 'bilinear', 'bicubic', 'lanczos2', and 'lanczos3', correspond to using different interpolation kernels, also known as interpolants. The bilinear method uses a triangular interpolation kernel, which is defined as:f(x)={1-|x||x|≤10otherwisefplot(@triangle,[-3.5 3.5])(The function triangle, as well as the other interpolation kernel functions used in this post, are at the end.)The bicubic method uses this piecewise cubic interpolation

...read more >>

https://blogs.mathworks.com/steve/2021/05/13/how-to-use-a-custom-interpolation-kernel-with-imresize/feed/ 2
如何在您的浏览器中运行博客代码 https://blogs.mathworks.com/steve/2021/05/04/how-to-run-blog-post-code-in-your-browser/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/05/04/how-to-run-blog-post-code-in-your-browser/回应 2021年5月04日星期二11:00:10 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=4464 < div class = "概览图像“> < img src = " https://blogs.mathworks.com/steve/files/run_in_browser_3.png " class = " img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image“alt = " / > < / div > < p >我在这里发表了超过560个博客自2006年以来,我估计,约98%的人从MATLAB脚本。最近,我开始写我的博客生活脚本。生活……< class = "阅读更多" href = " https://blogs.mathworks.com/steve/2021/05/04/how-to-run-blog-post-code-in-your-browser/ " >阅读更多> > < / > < / p > < p > < a href = " https://blogs.mathworks.com/steve/2021/05/04/how-to-run-blog-post-code-in-your-browser/ " >后如何在您的浏览器中运行博客代码< / >第一次出现在< a href = " https://blogs.mathworks.com/steve " >史蒂夫与MATLAB图像处理< / >。< / p > < div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " https://blogs.mathworks.com/steve/files/explaining_hmax_1 - 2. - png " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

I have published more than 560 blog posts here since 2006, and I estimate that about 98% of them started out as MATLAB scripts.Recently, I've started writing my blog posts as live scripts. Live scripts contain not only MATLAB code, but also code output, graphics output, and formatted text, including equations. It's a really nice way to share a technical story.Now, thanks to my friends on the MATLAB Central development team, I can write a blog post as a live script -- and then you can run the code yourself in your web browser!Let me show you how it works. Here is my blog post on using a custom interpolation kernel with imresize:Now scroll all the down to the bottom of the post (above the comments):Click on the "Run in your browser" button, and you'll get your own MATLAB Online session

...read more >>

https://blogs.mathworks.com/steve/2021/05/04/how-to-run-blog-post-code-in-your-browser/feed/ 0
策划*和b *颜色 https://blogs.mathworks.com/steve/2021/04/27/plotting-a-and-b-colors/?s_tid=feedtopost https://blogs.mathworks.com/steve/2021/04/27/plotting-a-and-b-colors/的评论 星期二,2021年4月27日21:05:39 + 0000 史蒂夫·埃丁 未分类的 https://blogs.mathworks.com/steve/?p=4436 < div class = "概览图像“> < img src = " https://blogs.mathworks.com/steve/files/show_ab_colors_6.png " class = " img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image“alt = " / > < / div > < p >今天的博客文章来自于计划一个主题,然后采取完全锋利的左转和做其他的事情。有关meshgrid我想写的东西,所以我是……< class = "阅读更多" href = " https://blogs.mathworks.com/steve/2021/04/27/plotting-a-and-b-colors/ " >阅读更多> > < / > < / p > < p > < a href = " https://blogs.mathworks.com/steve/2021/04/27/plotting-a-and-b-colors/ " >后策划*和b *颜色< / >第一次出现在< a href = " https://blogs.mathworks.com/steve " >史蒂夫与MATLAB图像处理< / >。< / p > < div > < img风格= "显示:块;保证金:汽车;max-width: 500 px; " src = " https://blogs.mathworks.com/steve/files/explaining_hmax_1 - 2. - png " onError = " this.onerror =零;this.src = ' https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_7.jpg ';“/>

Today's blog post comes from planning one topic, but then taking a sharp left turn and doing something else completely. I was thinking about writing something related to meshgrid, and so I was looking at some old blog posts in which meshgrid was used. For example, meshgrid was used in this 30-Dec-2010 post about the a* and b* component in the Lab color space.In reading over that old post, however, I realized that I made a rather egregious conceptual error in it. I plotted colors over the domain $ -100 \leq a^* \leq 100 $, $ -100 \leq b^* \leq 100 $, using $ L^* = 90 $, without realizing or explaining that most of those $ (L^*,a^*,b^*) $ combinations are far out of the sRGB gamut. In other words, they are not really displayable (even on a wide-gamut monitor). Also, the functions I used back then have since been superseded by new functions that are not only easier to use, but are also more helpful at looking at

...read more >>

https://blogs.mathworks.com/steve/2021/04/27/plotting-a-and-b-colors/feed/ 10