我应该使用哪种数据结构来存储视网膜? [英] Which data structure should I use for storing eye retina?

本文介绍了我应该使用哪种数据结构来存储视网膜?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要开发和申请我办公室主闸的开启/关闭。该应用程序将识别人眼视网膜,然后打开门,如果它有效。视网膜的图像将被存储在数据库中,它与即将到来的图像与数据库中存储的视网膜图像相匹配。另外当我想从数据库中删除特定人的视网膜的数据时,应该删除它。
在我的标准中,内存使用量应该是时间的反应不那么快速。



我应该为这种情况使用哪种数据结构? strong>

解决方案

存储



假设您可以使用您的技术获取视网膜图像:


  1. 获取视网膜图像的字节数组。


  2. 将此哈希存储在数据库中。



< hr>

认证


  1. 获取该人的视网膜图像

  2. 计算他/她的视网膜图像的哈希。

  3. 搜索数据库是否存在哈希。






抓住



我不知道如何生成视网膜图像。如果图像甚至与原始计算散列图像的图像不同,则两个散列值绝对不匹配,无法找到两个图像的相对相似度。



由于@DonReba在下面的评论中提到,因此专门为此而生成了哈希值。因此,可以通过使用正确的散列来克服捕获。






strong>


  1. 从数据库中删除图像的哈希是O(1)

  2. 搜索是O(n)或O(Log n)如果对散列进行排序

  3. 每个人的内存使用量为O(1)(取决于使用的哈希算法 - 可以是128字节,256字节等等)。


I need to develop and application for opening/closing of main gate of my office. That application will recognize human eye retina and then open the gate if it is valid. The image of retina is to be stored in database where it matches the upcoming image with the stored images of retina in db. Also when i want to delete the data of retina of specific person from database, it should be deleted. In my criteria, memory usage is to be less and very fast response of time

Which data structure should I use for this scenario?

解决方案

Storing

Assuming you can get the retinal image using your tech:

  1. Get the byte array of the retinal image.
  2. Compute the hash of that byte array.
  3. Store this hash in your database.


Authenticating

  1. Get the retinal image of the person looking for authentication.
  2. Compute his/her retinal image's hash.
  3. Search the database if there is an existing hash.


The catch

I'm not sure how retinal image is generated. If the image will be even 1 byte different from the image originally taken to compute the hash, the two hashes will absolutely won't match and there is no way to find the relative similarity of two images.

As @DonReba mentioned in the comment below, there are hashes generated specifically for this purpose. Hence, the catch can be overcome by using the correct hashing.


Some Numbers

  1. The deletion of image's hash from the database is O(1)
  2. Searching is O(n) or O(Log n) if you sort the hashes
  3. Memory usage is O(1) per person (depends on the hashing algorithm used - can be 128 bytes, 256 bytes etc).

这篇关于我应该使用哪种数据结构来存储视网膜?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆