Home > src > BN_pol_rec > functions > slask4.m

slask4

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 [A, map] = imread('H_final_24.bmp', 'BMP');
0003 [roadPoints, costMap] = findRoads(A);
0004 crossingPoints =[
0005    187    54
0006    185    79
0007    183    52
0008    158    18
0009    147    21
0010    142    22
0011    144    39
0012    156    77
0013    158    18
0014    154   139
0015    167   71
0016    147   30
0017    178   70
0018    150   109
0019    148   109
0020    62     195
0021    232    34
0022    223    41
0023    205    69
0024    246    44
0025    200    79
0026    196    84
0027    159   149
0028    157   157
0029    154   159
0030    143   141
0031    140   151
0032    140   151
0033    140   142
0034    122   113
0035    106   105
0036    103   106
0037     96   109
0038     34   140
0039     32   140
0040      1   145
0041     48    97
0042     62    99
0043     79    74
0044     97   132
0045     35   156
0046     64   175
0047    259    96
0048    256    96
0049     54   238
0050     71   118
0051     82   111
0052    147   119
0053     39   239
0054     ];
0055 [node1Node2Road_noCost, positionRoad_no, markedRoad, nodes] = identifyRoads(roadPoints, crossingPoints);
0056 clf
0057 %vi = [132    34];
0058 %vi = [153 24];
0059 vi = [62 138];
0060 fi = [240 34];
0061 %fi = [ 176    78];
0062 %fi = [ 158   87];
0063 image(A), hold on
0064  drowVi(vi(2), vi(1));
0065  drowRect(fi(2), fi(1));
0066 %plot(vi(2), vi(1), 'X')
0067 %plot(fi(2), fi(1), 'o')
0068 [cost, path, nodes, positionRoad_no, node1Node2Road_noCost] = findShortestPath(roadPoints, positionRoad_no, [fi 0], [vi 0],  nodes, node1Node2Road_noCost, costMap);
0069 plot(path(:,2), path(:,1))
0070  
0071     
0072     
0073

Generated on Wed 16-Mar-2005 09:17:47 by m2html © 2003