Skip to content

Chapter 4 - Vision: Image Similarity #1

@andrefrank

Description

@andrefrank

Dear authors,
the comments in your book and also the method
func similarity ( to image : UIImage ) > Float ? { ....

implies that 'computeDistance' from the Apples' Vision framework returns the similarity between two images. For my understanding the method computes how much different images are.

So, if the value of the variable 'similarity' is '0' that means the images are 100% equal. Please correct me if I'm wrong.

The correct output at Line 66-69 in 'ContentView.swift' should be something like

 Text(
                        "Similarity: " + 
                        "\(similarity >= 0 ? String(100-similarity) : "...")%"
                    ).font(.title).bold()

Kind regards
Andre

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions