简体   繁体   中英

how to store images and display the images when the name of the image is entered in electron app?

I'm trying to make a desktop application wherein I have few images stored inside app, whenever I type some text, the text should be scanned and the corresponding image should be displayed in realtime in electron

Please help me out.

Tell us more details about that... Like, wish your current system? Any way, I recommend you make this app with Python, that have some solutions for that (image recognition).

From what I understand this can be done in 3 ways depending on what your trying to do.

If you're trying to do some sort of image search depending on the name of the file this can be quite simple.

Example: Directory images/ contains an image called rose.png and the user types rose . All you would need to do is get a list of files in the directory using fs and loop through all the files and check if the file name contains the word rose .

If your looking for a solution in which the user describes the image for example you have a directory full of car images and the user types 4 door blue car I say you have 2 options.

1: Give tags/meta data to the images and scan the users input for matching tags eg if one of the images has the tags 4 door and blue then the user input of 4 door blue car would match this image. One disadvantage of this method is the user needs to be very specific to the tags which images are given.

2: Use some machine learning and NLP (natural language processing) algorithms. NLP for picking out critical data from the users input and a machine larning algorithm to scan the images for that data. You could use a library like TensorFlow for this. There is an unofficial node version of the library but from my knowledge there is no documentation for it, you will need to use the generic python docs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM