Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hafeezrana opened this issue Mar 20, 2023 · 0 comments
Open

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

hafeezrana opened this issue Mar 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@hafeezrana
Copy link

hafeezrana commented Mar 20, 2023

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",
                                  );
                                },
                              );
                            },
                          );
                        }),
@hafeezrana hafeezrana added the bug Something isn't working label Mar 20, 2023
@hafeezrana hafeezrana changed the title How to get the index of image with which latest images match? How to get the index of image with which latest image matches? Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant