skel= bwmorph (ima,'skel',Inf); B = bwmorph (skel, 'branchpoints'); E = bwmorph (skel,. Then access it at the points of interest to find the distance to the line. You are framing the path traversal as the movement between two points in a binary image while stepping only on the white pixels. Brett's Pick this week is Arclength, by John D'Errico. Choose a web site to get translated content where available and see local events and offers. As expected, there is a constant-value minimum path along the diagonal. As expected, there is a constant-value minimum path along the diagonal. Currently, this function returns the distance to. Description. Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. The bwdistgeodesic function is used to compute the geodesic distance of each non-loaded edges (Fig. Khaled Youssef on 8 Jan 2020. Can we do that without using function, just by checking connectivity from end point to branch point. /Sandra 1 Comment. Regions where BW is false represent constrained regions that cannot be traversed in the distance. Then pick two branchpoints to test and make an image with just those two. This MATLAB function computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. e. Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. /Sandra. This MATLAB function computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. Learn more about shortest path, bwdistgeodesic MATLAB I have a square grid of a specific size, say 50 x 50. Length of a thin curved object in an image. Thank you for your reply. Well, I'm not sure what the difference is between what Steve blog's proposes and what Walter proposes, but the idea of using bwdistgeodesic() should be conceptually quite simple. You can then std () the distances. Last time, I showed this example of finding the shortest paths between theLearn more about image processing, route, bwdistgeodesic, binary image, graydist Hi guys, I'm trying to find the shortest path between 2 points using the 'bwdistgeodesic' function. I want to calculate geodesic distance between non-adjacent nodes in an directed graph. Then remove those pixels. e. And there is no definitive crossways width. . . Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. The fibers in these images needs to be analyzed: I’m especially interested in the fiber thickness. Bugs are not listed here, search and report them on the bug tracker instead. . T = T1 + T2. How to check it from bwdistgeodesic(BW,C,R). We are interested in the distance from an initial corner to each point on the edge. This MATLAB function computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. I tried using bwdistgeodesic but appears this function only supports 2D binary images and hence the starting point will be an edge of the cube rather than a face of the cube. Calculate the gray-weighted distance transform, specifying the upper left corner and the lower right corner of the square as seed locations. Copy. . Currently, this function returns the distance to the nearest seed location, but no the index. Copy. bwdistgeodesic() with the uncomplemented version. bwpropfilt. Learn more about tortuosity, distance map, geodesic path, 3d distance map, bwdistgeodesic 3d Hi, I have a 3D binary image (effectively a cube) and I want to create a distance map of the image with the starting point(s) being one of the sides/faces of the cube (i. You can reconstruct that spur-less. Currently, this function returns the distance to the nearest seed location, but no the index. . With an area of 944,735 km 2 (364,764 sq mi) it is Canada's third-largest. . Does a. Create a binary matrix in the shape of the oval. Length of a thin curved object in an image. Next call bwmorph. Choose between 2 routes. Copy. Description. I have to find the shape of the object so i have to find the length of the x and y axis length of the shape. I am using MatLab 7. Regions where BW is true represent valid regions that can be traversed in the computation of the distance transform. Start at a endpoint, start walking and find all pixels that are closer than the nearest branchpoint. . bwdistgeodesic is not supported for code. Start at a endpoint, start walking and find all pixels that are closer than the nearest branchpoint. bwdistgeodesic On this page Syntax Description Examples Compute Geodesic Distance Transformation of Binary Image Input Arguments BW mask CR idx method Output. You could apply bwdist to find all pixels that are within some distance of the seed pixels, and bwdistgeodesic if you want to constrain that distance to certain paths. On the other hand, distance through 3 space is quite easy to get in this situation, using pdist2() KSSV on 29 Mar 2019. Hello, bwdist allows one to use Euclidean distance as metric while for bwdistgeodesic that is not an option. Theme. . Vota. A true. Learn more about bwdist, bwdistgeodesic, euclidean distance, quasi-euclidean Image Processing Toolbox. . Then take the max value of that. Assuming your image is binary and called "I", this is all it takes: Theme. D = bwdistgeodesic (BW,mask) computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. bwdistgeodesic is not supported for code. Learn more about bwdistgeodesic, distance transform, shortest path, seed . all the voxels presen. Answers (1) Use either bwdist or bwdistgeodesic after having created a mask in which the line pixels are set to 1. . You can first find the branch points and endpoints using BWMORPH, and then call BWDISTGEODESIC to get the distance from the branches. A fabricated fiber structure is made visible using a SEM. Hello, bwdist allows one to use Euclidean distance as metric while for bwdistgeodesic that is not an option. Thank you for suggesting bwdistgeodesic(), but after playing around with the function call it seems to just turn everything in the image into B/W, rather than creating another ROI from the original shape. Here is the image that I got after applying regionalShortest path on an image can be handled deterministically using techniques such as bwdistgeodesic. Landscape and Population Distribution. . D = bwdistgeodesic(BW,mask) computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. The bwdistgeodesic function can help you with the 'cityblock' or ' quasi-euclidean ' method : For example, if you choose the first edge point(x1,y1) and you compute bwdistgeodesic(bw,y1,x1,'cityblock'), you will get a distance matrix whose values will be in the range [0 : number of connected components -1]. Voir également. Theme. What is the quasi-euclidean distance metric in 3D that is used by the function bwdistgeodesic? I only find documentation of it in 2D. . Alex Taylor on 3 Jun 2015. Hello, bwdist allows one to use Euclidean distance as metric while for bwdistgeodesic that is not an option. pygeodesic is similar to other libraries on PyPi (such as gdist. And there is no definitive crossways width. e. . Depth code from Marine Ecological Classification. I've been tinkering with this problem off and on for a few days, and I think it might take a few posts to explore some of the interesting ideas and issues posed by this problem. Accepted Answer. you can do something like that: clc; clear all; % read in a sample image -- also see letters. Theme. can you show how can i use bwdistgeodesic in the code above. Walter Roberson on 23 Nov 2017 ×Just as the title says, I would like to know the index of the closest pixel in my image using the geodesic distance transform. Next call bwmorph. Learn more about tortuosity, distance map, geodesic path, 3d distance map, bwdistgeodesic 3d Hi, I have a 3D binary image (effectively a cube) and I want to create a distance map of the image with the starting point(s) being one of the sides/faces of the cube (i. Well, I'm not sure what the difference is between what Steve blog's proposes and what Walter proposes, but the idea of using bwdistgeodesic() should be conceptually quite simple. It = bwmorph (I,'thin','inf'); B = bwmorph (It,'branchpoints');Alex, I don't think the documentation is entirely clear. 在四叉树分解中设置块值Calculate the gray-weighted distance transform, specifying the upper left corner and the lower right corner of the square as seed locations. Currently, this function returns the distance to the nearest seed location, but no the index. Find perimeter of objects in binary image. thank you for your time. To create filled, replace every 0 in blank with its distance to the nearest 1 (staring at 2), traveling along cardinal directions (up, down, left and right) without passing. Learn more about bwdistgeodesic, distance transform, shortest path, seed . Khaled Youssef on 8 Jan 2020. Note: in the general case, the centroid of an object can be part of the background, in which case it might not be reachable from points in the object. Start at a endpoint, start walking and find all pixels that are closer than the nearest branchpoint. Regions where BW is false represent constrained regions that cannot be traversed in the distance. You are framing the path traversal as the movement between two points in a binary image while stepping only on the white pixels. Learn more about code generation, matlab function, digital image processing, matlab coder, bwdistgeodesicBrett's Pick this week is Skeleton3D, by Philip Kollmansberger. D = bwdistgeodesic(BW,mask) computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. Bugs are not listed here, search and report them on the bug tracker instead. Learn more about image processing, regionprops, bwdistgeodesic, mask Image Processing ToolboxThank you for your reply. Can bwdistgeodesic be used on a 3D binary image?. D = bwdistgeodesic (BW,mask) computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. Then call bwdist to get the distance transform on the binary image. You are framing the path traversal as the movement between two points in a binary image while stepping only on the white pixels. One of the distance metrics options is 'quasi-euclidean' which measures the total Euclidean distance along a set of horizontal, vertical, and diagonal line segments that cicumvent the objects. According to Steve Eddins 's image processing blog post on this topic, the bwdistgeodesic function (since r2011b) computes the shortest path that avoids objects. One of the distance metrics options is 'quasi-euclidean' which measures the total Euclidean distance along a set of horizontal, vertical, and diagonal line segments that cicumvent the. I've been tinkering with this problem off and on for a few days, and I think it might take a few posts to explore some of the interesting ideas and issues posed by this problem. Then call bwdist to get the distance transform on the binary image. You need to account for corner connected v. Help Center; Community; MathWorksFinally, I'll explore how to use a new function, bwdistgeodesic, to find shortest paths when there are constraints on where the paths can go. bwdistgeodesic is not supported for code. Regions where BW is true represent valid regions that can be traversed in the computation of the distance transform. This is the shortest path problem and there are several algorithms you can search for and learn about. I am using MatLab 7. I want. Actually, there are several other useful functions that can be applied to this task, including imregionalmin and bwdistgeodesic, a new function that just shipped in R2011b. Navigazione principale in modalità Toggle. all the voxels presen. You could use bounding box, or MajorAxisLength and MinorAxisLength, which is the axes of an ellipse fitted to the blob. I use two functions from the file exchange. Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed. Currently, this function returns the distance to the nearest seed location, but no the index. Copy. The fibers in these images needs to be analyzed: I’m especially interested in the fiber thickness. Based on your location, we recommend that you select: . Select a Web Site. bwdistgeodesic() will give you the shortest path. bwdistgeodesic with Euclidean distance as metric. . endpts = ismember (convn (double (skel3d),ones (3,3,3),'same'), [1 2]); 7 Comments. How timely! For a medical image processing seminar I. José-Luis on 7 Jul 2016. 二、基于区域的图像分割 1. Alas this doesn't seem to be the case (see code below). What is the quasi-euclidean distance metric in 3D that is used by the function bwdistgeodesic? I only find documentation of it in 2D. all the voxels present on that side of the cube; the subscripts of each of the starting voxels were appropriately identified using the 'ind2sub' function and the each voxel will have the. Unfortunately, shapely distance function calculates the Euclidean Distance and not the geodesic distance. if there are no finite values in D, break the loop. i need help plzz I want to store all my result in the same table. idx is a vector of linear indices of seed locations. 四叉树分解 2. . In the bwdistgeodesic function, what is it expecting for the variable "mask"? How could I use image analysis to generate said mask? I've looked into using regionprops 'Extrema' property, but since I'm not sure what the "mask" variable is in bwdistgeodesic, I'm not sure how I would use the x,y dimensions from 'Extrema' in a mask. . That is to say: dist_A-B = min (geodist (A, B1), geodist (A, B2. D = bwdistgeodesic(BW,mask) は、バイナリ イメージ BW と mask で指定されるシード位置を与えられ、測地線距離変化を計算します。 BW が true である領域は、距離変換の計算中に遷移できる有効な領域を表します。 D = bwdistgeodesic (BW,mask) computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. Learn more about tortuosity, distance map, geodesic path, 3d distance map, bwdistgeodesic 3d Hi, I have a 3D binary image (effectively a cube) and I want to create a distance map of the image with the starting point(s) being one of the sides/faces of the cube (i. Then call imfill (binaryImage, 'holes') to get three solid branches. Sign in to comment. Can bwdistgeodesic be used on a 3D binary image?. Vai al contenuto. Learn more about distance, boundary pixelsSir, this method gives exact same answer which is expected, but i need to take input of pixel co-ordinates of points inside these six circles and these points need not be center of the circle, then by using these co-ordinates only, i have to find the diameters of the circles. all the voxels presen. Contribute to ericabusch/octo development by creating an account on GitHub. e. Image Analyst il 29 Mar 2014. Then put in each branch one at a time and call bwdistgeodesic () to see if they're connected by that branch. %%画像を重ねる. Actually, there are several other useful functions that can be applied to this task, including imregionalmin and bwdistgeodesic, a new function that just shipped in R2011b. A tag already exists with the provided branch name. . so i think i need to draw straight lines from this point to the edge of the circle,. Learn more about image processing, regionprops, bwdistgeodesic, mask Image Processing ToolboxCreating a function (pathfinding algorithm) where: blank is a two-dimensional array comprised of -1s, 0s and 1s, and filled is blank modified to the specifications below. hello and good day, sir @imageanalyst. . Description example D = bwdist (BW) computes the Euclidean distance transform of the binary image BW . Alas this doesn't seem to be the case (see code below). D = bwdistgeodesic (BW,mask) computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. Looping images in folder. I want to compute the euclidean distance of "some" background pixels to the objec. 0. Regions where BW is false represent constrained regions that cannot be. Brett's Pick this week is Arclength, by John D'Errico. This set represents the shortest path. *Actually, I'm using bwdistgeodesic at the next step to find the minimum distance between C and R. PixelIdxList {:} %woo! For example, if you choose the first edge point (x1,y1) and you compute bwdistgeodesic (bw,y1,x1,'cityblock'), you will get a distance matrix whose values will be in the range [0 : number of connected components -1]. Next call bwmorph. ] and keep the minimum distance. I am using MatLab 7. Description. Matlab implementation of several methods for cell detection and cell segmentation - Cell-segmentation-methods-comparison/seeded_watershed_dt. Learn more about code generation, matlab function, digital image processing, matlab coder, bwdistgeodesicLength of a thin curved object in an image. Then call imfill (binaryImage, 'holes') to get three solid branches. T1 = graydist (A,1,1); T2 = graydist (A,3,3); Sum the two transforms to find the minimum path between the seed locations. Steve discussed this problem in his earlier post on Exploring Shortest Paths and showed a solution based on Geodesic distance transform (bwdistgeodesic). 0. Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. Regions where BW is true represent valid regions that can be traversed in the computation of the distance transform. This MATLAB function computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. As expected, there is a constant-value minimum path along the diagonal. bwdistgeodesic() can help if the surface is voxelized, though. Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. As in the following matrix (W), zeros reperesent that those nodes are non-adjacent and other values show weights of the edges corresponding nodes. Divide the geodesic distance by the hypotenuse between the two end points to calculate tortuosity. Regions where BW is true represent valid regions that can be traversed in the computation of the distance transform. You can reconstruct that spur-less. i'm new with matlab. Saltar al contenido. You now have an array of distances to the oval. Currently, this function returns the distance to the nearest seed. Regions where BW is true represent valid regions that can be traversed in the computation of the distance transform. Use a single for loop. Currently, this function returns the distance to the nearest seed location, but no the index. Gray-weighted distance transform of grayscale image. Then remove those pixels. Here's what I do: According to Steve Eddins's image processing blog post on this topic, the bwdistgeodesic function (since r2011b) computes the shortest path that avoids objects. Regions where BW is false represent constrained regions that cannot be traversed in the distance. T = T1 + T2. skel= bwmorph (ima,'skel',Inf); B = bwmorph (skel, 'branchpoints'); E = bwmorph (skel,. skel= bwmorph (ima,'skel',Inf); 'branchpoints'); 'endpoints'); [y,x] = find (E);They are randomly spaced throughout a larger image and have varying lengths and orientation. 您还可以沿图像中的路径测量单个. Figure 4b illustrates the geodesic distance of the cantilever beam results. Answers (1) Sean de Wolski on 28 Aug 2015. Currently, this function returns the distance to the nearest seed. In any case, bwdistgeodesic should work for that. According to Steve Eddins 's image processing blog post on this topic, the bwdistgeodesic function (since r2011b) computes the shortest path that avoids objects. Then remove those pixels. skel= bwmorph (ima,'skel',Inf); B = bwmorph (skel, 'branchpoints'); E = bwmorph (skel, 'endpoints'); Unfortunately, shapely distance function calculates the Euclidean Distance and not the geodesic distance. Learn more about bwdist, bwdistgeodesic, euclidean distance, quasi-euclidean Image Processing Toolbox. Show 2 older comments Hide 2 older comments. In any case, bwdistgeodesic should work for that. Development Edit. The bwdistgeodesic function can help you with the 'cityblock' or ' quasi-euclidean ' method : For example, if you choose the first edge point(x1,y1) and you compute bwdistgeodesic(bw,y1,x1,'cityblock'), you will get a distance matrix whose values will be in the range [0 : number of connected components -1]. bwdistgeodesic (helpful link) can help you with that. all the voxels presen. diagram. 9. i have a 512 x512 matrix image called original, a 20x24 matrix image of a bright oval with lower (darker but not zero) values around the oval in the 20x24 matrix called insert, and the same 20x24 m. . As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. 3 Comments. Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. D = bwdistgeodesic (BW,mask) computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. Copy. It would be nice to write a Matlab-script that could do the image analysis and provides a histogram of the determined fiber thicknesses. If you had an elongated, irregularly-shaped blob and the major axis was where you think it would be, then what is. You are framing the path traversal as the movement between two points in a binary image while stepping only on the white pixels. I want the measurement by following the crack pattern. standard deviation of points from line. bwdistgeodesic with Euclidean distance as metric. bwdistgeodesic with Euclidean distance as metric. I calculated the distance according to the following equation: I used the MATLAB function. Learn more about tortuosity, distance map, geodesic path, 3d distance map, bwdistgeodesic 3d Hi, I have a 3D binary image (effectively a cube) and I want to create a distance map of the image with the starting point(s) being one of the sides/faces of the cube (i. Should be fast, probably faster than the first method, since there are only. Then access it at the points of interest to find the distance to the line. using bwdistgeodesic to find shortest paths subject to constraint Get the MATLAB code . sce","path":"src/builder_gateway_cpp. Should be fast, probably faster than the first method, since there are only. . Is there a specific reason for this behavior?OUT = bwdistgeodesic(imt2, M, 'cityblock'); MMM=(isnan(OUT) & imt2); nnz(MMM) ans = 0. As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. In sum, I want the INDX from "bwdist" but constrained to a mask: [D,INDX]=bwdist (BW,'quasi-euclidean'); After doing some research I found out that "bwdistgeodesic" allows to. D = bwdistgeodesic(BW,mask) computes the geodesic distance transform, given the binary image BW and the seed locations specified by mask. Learn more about bwdist, bwdistgeodesic, euclidean distance, quasi-euclidean Image Processing Toolbox. . S = Shallow (0-20m), P = Photic (20-50m), M = Mid-depth (50-200m), D = Deep (200-1000m), A = Abyssal (>1000m)British Columbia is the westernmost province of Canada, bordered by the Pacific Ocean. Learn more about loop, image processingi have a 512 x512 matrix image called original, a 20x24 matrix image of a bright oval with lower (darker but not zero) values around the oval in the 20x24 matrix called insert, and the same 20x24 m. Second, regardless of which thinning approach you start with, if you calculate a bwdistgeodesic transform on your thinned bw image--using a mask that is true at all of the endpoints and false elsewhere--the longest constrained path will be the one that contains the maximum value in transformed image. You are framing the path traversal as the movement between two points in a binary image while stepping only on the white pixels. Copy. Your binary image should be 2 dimensional, if it is not convert the original image into gray cale and then create binary image,Brett's Pick this week is Skeleton3D, by Philip Kollmansberger. skeleton = bwskel(logical(V)); branch_points = bwmorph3(skeleton, 'branchpoints'); end_points = bwmorph3(skeleton, 'endpoints'); branch_length =. Help Center; Community; MathWorksbwdistgeodesic is not supported for code. But sometimes it has more than 1 possible path and. Learn more about bwdist, bwdistgeodesic, euclidean distance, quasi-euclidean Image Processing Toolbox. You can first find the branch points and endpoints using BWMORPH, and then call BWDISTGEODESIC to get the distance from the branches. Last time, I showed this example of finding the shortest paths between theCan bwdistgeodesic be used on a 3D binary image?. Learn more about bwdistgeodesic, bwdist Image Processing Toolbox I have a binary 3D image that consists of a 3D object with "1"-valued pixels and background with "0"-valued pixels. For each pixel in BW, the distance transform assigns a number that is the distance between that pixel and. Then remove those. Image processing: Determine fiber diameter. Then I multiplied the 2 images. One way to find the longest spine might be to compute the skeleton and endpoints with bwmorph (). Vancouver, and the communities. Learn more about bwdist, bwdistgeodesic, euclidean distance, quasi-euclidean Image Processing Toolbox. Actually, there are several other useful functions that can be applied to this task, including imregionalmin and bwdistgeodesic, a new function that just shipped in R2011b. 区域生长 2. . all the voxels presen. Regions where BW is false represent constrained regions that cannot be. 13 | You are now following this blog post. Copy. Also some matlab functions that people suggest can only handle 2D data (like bwdistgeodesic, which could be used to evade non-skeleton voxels). Or you can use the Pythagorean theorem and the coordinates from bwboundaries if you want an "as the crow flies" distance, which in general is different than you'll get from either bwdist function. Learn more about bwdistgeodesic, distance transform, shortest path, seed As the title reads, I would like to use bwdistgeodesic by providing a volume and seed locations. Sign In; Products; Solutions; Academia; Support; Community; MathWorks Matrix Menu. As expected, there is a constant-value minimum path along the diagonal. 0(R2009b)and bwdistgeodesic is not available. 1 Comment. Currently, this function returns the distance to the nearest seed location, but no the index. By removing. Accedi per commentare. I have a 3D binary image (effectively a cube) and I want to create a distance map of the image with the starting point(s) being one of the sides/faces of the cube (i. . de 2016. Learn more about bwdist, bwdistgeodesic, euclidean distance, quasi-euclidean Image Processing Toolbox. . bwdistgeodesic() will give you the shortest path. José-Luis il 7 Lug 2016. But sometimes it has more than 1 possible path and I don't know how to get all the routes separatelly. Image Processing Using Matlab - Free download as PDF File (. Learn more about bwdist, bwdistgeodesic, euclidean distance, quasi-euclidean Image Processing Toolbox Hello,. bwdistgeodesic with Euclidean distance as metric. According to Steve Eddins 's image processing blog post on this topic, the bwdistgeodesic function (since r2011b) computes the shortest path that avoids objects. Learn more about bwdist, bwdistgeodesic, euclidean distance, quasi-euclidean Image Processing Toolbox. Find the largest value in D. e. Iniciar sesión para comentar. 4a). Divide the array by max() of the array, which should be 1 at the outer edges. e. all the voxels presen. Just as the title says, I would like to know the index of the closest pixel in my image using the geodesic distance transform. /Sandra. Then put in each branch one at a time and call bwdistgeodesic () to see if they're connected by that branch. You can apply it to the coordinates in BW4 which can be found using [y,x]=find(~BW4). Description example D = bwdist (BW) computes the Euclidean distance transform of the binary image BW . Hello, bwdist allows one to use Euclidean distance as metric while for bwdistgeodesic that is not an option. Cambiar a Navegación Principal. If you have any code regarding this please send it to me. Hello, bwdist allows one to use Euclidean distance as metric while for bwdistgeodesic that is not an option. The goal of my problem…thank you for your concern, but in my algorithm i want to fix the D values, D value in the sense D = 2 or 3 i want to traverse on white pixels after every two or three pixels i want to insert a node. But for the first step, I have to find the correct starting and ending points (which is shown in the third image with a cross sign). png J.