*4.1. Clustering based on Euclidean Distance*

To compare the HDFV performance featuring the figure–ground images, we selected five clusters with different characteristics and picked six samples from each. Figure 9 shows the nearest five cases to the targets according to the plot shape clustering and plot with building clustering. The five clusters show different characters. For example, cluster 1 has a square plot with lined buildings, while the buildings in cluster 3 are distributed intensively. The samples in cluster 2 are a relatively small plot with one or two buildings. The samples in cluster 4 and cluster 5 have linear plots and irregular plots. This result indicates that samples of different morphology types could be clustered automatically according to HDFV without the need to pre-define the morphology types.

**Figure 9.** The plot shape most similar five cases and plot with buildings most similar five cases retrieved based Euclidean distance between HDFVs.

The samples in a cluster reflect the similarity in plot shape when clustering based on plot shape and in building distribution texture when clustering based on the plot with buildings. For example, in cluster 3, the target is an aged residential area in Nanjing. According to an architect's intuitive observation, cases retrieved based on the plot with buildings were similar to the target, with intensive building texture as the target, while some plot shapes included corners. On the contrary, for example, in cluster 2, cases retrieved based on the site shape varied in the building distribution but were similar in shape. We found potential indicating that the HDFV is sensitive to the urban fabric.

In the deep learning model, the HDFV was calculated by flattening the grayscale value matrix of the image, reflecting the distribution of n × n pixel matrix values over a 1 × n × n matrix. The HDFV reflects the morphology characteristic based on the distribution of pixels in an image. Moreover, the HDFV compressed the pixel distribution by increasing the impacts of effective pixels and decreasing the influence of ineffective pixels.

The clusters represent the similarity in the plot shape or the building texture. Different morphological characteristics, such as narrow plots with intensively distributed buildings and irregular plot shapes with multiple buildings, can be observed in terms of the clusters, consistent with an architect's intuitive observation. Therefore, the HDFV is sensitive to the urban morphology indicated by the pixel distribution by carrying the overall and informative features of the samples.
