Skip to content

How to get the index of image with which latest image matches? #21

@hafeezrana

Description

@hafeezrana

here images are the list of snapshots data stored for registered employees. how I get the employeeId or name who has been found while matching new image with already existed image. and matching proccess vary over imageType numbers too.
there is no proper documentation written for the code.

createButton("Match", () {
                          var image2 = Regula.MatchFacesImage();
                          image2.bitmap = images;
                          image2.imageType = 1;

                          setState(() => _similarity = "Processing...");
                          var request = Regula.MatchFacesRequest();
                          request.images = [image1, image2];

                          Regula.FaceSDK.matchFaces(jsonEncode(request)).then(
                            (value) {
                              var response = Regula.MatchFacesResponse.fromJson(
                                  json.decode(value));
                              Regula.FaceSDK.matchFacesSimilarityThresholdSplit(
                                jsonEncode(response!.results),
                                0.75,
                              ).then(
                                (str) {
                                  var split =
                                      Regula.MatchFacesSimilarityThresholdSplit
                                          .fromJson(json.decode(str));
                                  setState(
                                    () => _similarity = split!
                                            .matchedFaces.isNotEmpty
                                        ? ((split.matchedFaces[0]!.similarity! *
                                                    100)
                                                .toStringAsFixed(2) +
                                            "%")
                                        : "error",
                                  );
                                },
                              );
                            },
                          );
                        }),

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions