|Subject:||Re: Deleting multiple Values in an 2D-Array|
|Date:||Mon, 31 Dec 2012 15:51:23 +0100|
On 30 December 2012 09:51, Nikolai Huckle <address@hidden> wrote:Deleting multiple points is easy:
> The first step I did(which im not sure is needed), was to delete all
> the multiple occuring value pairs, but this already has proven to be
> difficult as I cant vectorize the code which i used.
minAJ = randi (50,2000,1);
minEJ = randi (50,2000,1);
Tuple1 = unique ([minAJ, minEJ], "rows");
As to your actual problem...
This considerably more tricky. I think your best option, if the point
> The issue I have is, that I only want the outline of the point
> cloud: the farthest points to the right, the left and upwards.
cloud is actually pixels in a binary image, to use bwborder from the
image package. Here is one way to do it, and you don't need to remove
idx = sub2ind ([50, 50], minAJ, minEJ);
bw = zeros (50,50);
bw(idx) = 1;
imshow (bwborder (bw))
Sadly, bwborder only considers 4-connectivity, i.e. diagonal pixels
are not adjacent. If you need finer control than that, you can use
- Jordi G. H.
|[Prev in Thread]||Current Thread||[Next in Thread]|