Help regarding image recognition inside a live video game
이전 댓글 표시
Hello,
I want to do some image recognition and object detection for a video game in which objects move constantly. The first step to do this is to provide MATLAB with the input images by taking a screen shot and saving it inside a folder. This however may be a slow approach for a fast paced game.
What I really want to do is get MATLAB to continuously do object recognition on a video game that will be running maximized (The end goal is to use machine learning to study these images). I came across an article https://uk.mathworks.com/help/vision/examples/face-detection-and-tracking-using-live-video-acquisition.html where they do what I want but instead using a webcam video input. Is it possible to do the same thing but with the computer display itself?
Please also note that I do not want to record a video, save it and then do recognition on that as the game is real time so object detection should be real time as well.
Thank you.
답변 (1개)
Image Analyst
2018년 10월 5일
편집: Image Analyst
2018년 10월 5일
0 개 추천
Essentially you put getframe() in a loop and then analyze the image it returns.
댓글 수: 4
Navtej Dhot
2018년 10월 7일
Image Analyst
2018년 10월 7일
If it's your game, you should know what's on the screen at any given time. If it's not, and you're using a video camera for example to look at a different screen, then you can use getsnapshot() to get images from your video camera and then do your analysis on them.
Navtej Dhot
2018년 10월 7일
Image Analyst
2018년 10월 8일
- If you're using a video camera to view anohter screen, you can use getsnapshot().
- If you're using MATLAB and playing the game from MATLAB source code and have access to the figure window, then you can use getframe (sounds like this is not the case).
- If it's just some other completely different app running on your computer then I don't know what you'd do. Somehow you'll have to get screenshots of your computer screen.
카테고리
도움말 센터 및 File Exchange에서 Video games에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!