Reputation: 141110
I want to evaluate the grid quality where all coordinates differ in the real case. Signal is of a ECG signal where average life-time 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 Abo-Zahhad) with with 3-leads (2 on chest and one at left leg - MIT-BIT 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 x-axis (time) and average grid distance in y-axis (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 quasi-euclidean 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.
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.
Upvotes: 0
Views: 183
Reputation: 141110
Simply, do not do it in the post-processing. 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.
Upvotes: 0
Reputation: 36
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!
Upvotes: 1