image processing  How to compute distance and estimate quality of heterogeneous grids in Matlab?
2020腾讯云双十一活动，全年最低！！！（领取3500元代金券），
地址：https://cloud.tencent.com/act/cps/redirect?redirect=1073
【阿里云】双十一活动，全年抄底价，限时3天！(老用户也有)，
入口地址：https://www.aliyun.com/1111/home
up vote 0 down vote favorite I want to evaluate the grid quality where all coordinates differ in the real case. Signal is of a ECG signal where average lifetime is 75 years. My task is to evaluate its age at the moment of measurement, which is an inverse problem. I think 2D approximation of the 3D case is hard (done here by AboZahhad) with with 3leads (2 on chest and one at left leg  MITBIT arrhythmia database): where f is a piecewise continuous function in R^2, \epsilon is the error matrix and A is a 2D matrix. Now, I evaluate the average grid distance in xaxis (time) and average grid distance in yaxis (energy). I think this can be done by Matlab's Image Analysis toolbox. However, I am not sure how complete the toolbox's approaches are. I think a transform approach must be used in the setting of uneven and noncontinuous grids. One approach is exact linear time euclidean distance transforms of grid line sampled shapes by Joakim Lindblad et all. The method presents a distance transform (DT) which assigns to each image point its smallest distance to a selected subset of image points. This kind of approach is often a basis of algorithms for many methods in image analysis. I tested unsuccessfully the case with bwdist (Distance transform of binary image) with chessboard (returns empty square matrix), cityblock, euclidean and quasieuclidean where the last three options return full matrix. Another pseudocode % https://stackoverflow.com/a/29956008/54964
%// retrieve picture
imgRGB = imread('dummy.png');
%// detect lines
imgHSV = rgb2hsv(imgRGB);
BW = (imgHSV(:,:,3) < 1);
BW = imclose(imclose(BW, strel('line',40,0)), strel('line',10,90));
%// clear those masked pixels by setting them to background white color
imgRGB2 = imgRGB;
imgRGB2(repmat(BW,[1 1 3])) = 255;
%// show extracted signal
imshow(imgRGB2)
where I think the approach will not work here because the grids are not necessarily continuous and not necessary ideal. pdist based on the Lumbreras' answer In the real examples, all coordinates differ such that pdist hamming and jaccard are always 1 with real data. The options euclidean, cytoblock, minkowski, chebychev, mahalanobis, cosine, correlation, and spearman offer some descriptions of the data. However, these options make me now little sense in such full matrices. I want to estimate how long the signal can live. Sources J. Müller, and S. Siltanen. Linear and nonlinear inverse problems with practical applications. EIT with the Dbar method: discontinuous heartandlungs phantom. http://wiki.helsinki.fi/display/mathstatHenkilokunta/EIT+with+the+Dbar+method%3A+discontinuous+heartandlungs+phantom Visited 29Feb 2016. matlab imageprocessing

this question edited May 23 '17 at 12:01 Community ♦ 1 1 asked Feb 29 '16 at 7:54 Léo Léopold Hertz 준영 42.2k 127 369 581
 2 Answers
up vote 1 down vote There is a function in Matlab defined as pdist which computes the pairwisedistance between all row elements in a matrix and enables you to choose the type of distance you want to use (Euclidean, cityblock, correlation). Are you after something like this? Not sure I understood your question! cheers!

this answer answered Feb 29 '16 at 14:36 Lumbreras 26 7 I am thinking how to interpret the outputs of pdist's options. I clarified the target of my task. I need to understand what those options do. Can you please explain which options are most common for engineering tasks. – Léo Léopold Hertz 준영 Feb 29 '16 at 17:29
 up vote 0 down vote AcceptedAcceptedAccepted
Simply, do not do it in the postprocessing. Those artifacts of the body can be about about raster images, about the viewer and/or ... Do quality assurance in the signal generation/processing step. It is much easier to evaluate the original signal than its views.

this answer answered Jan 6 '17 at 12:18 community wiki Léo Léopold Hertz 준영

相关阅读排行
 1Matlab绘图很详细，很全面
 2卡尔曼滤波简介及其算法实现代码（C++/C/MATLAB）
 3bp神经网络及matlab实现
 4Matlab textread函数详解
 5Matlab 线性拟合 & 非线性拟合