Homebrew [Example] Camera Service (high framerate and fast drawing)

  • Thread starter Deleted User
  • Start date
  • Views 3,249
  • Replies 20
  • Likes 6
D

Deleted User

Guest
OP
Hello everyone.

I tested a few tricks with the camera last week. I was really disappointed to not be able to run the camera at the maximum frame rate without having some timeout results. I investigated the thing and I got the thing to work fine. Unfortunately, drawing the image was taking a too long time and the loop was only iterating 20 times per second. I continued my research and tests and I finally got it to work. I decided to share it so.

The code is available on GitHub : https://github.com/MrNbaYoh/3DSCameraExample

I will surely make some improvements and explain how the thing is working because the documentation concerning the Camera and Y2R services are really lean on 3dbrew.

Maybe a video would be nice ?
 

Goombi

my_crypto = meme_crypto
Member
Joined
Jun 1, 2014
Messages
144
Trophies
0
Location
RnVja1lvdU15RHVkZQ
Website
www.goombi.fr
XP
178
Country
France
Tested it (N3DS 10.3, *hax 2.5 from 11/9, IronHax,), worked perfectly! That smooth 60fps is great, good job!
Combined to the "Home = Screenshot" function we now have a rudimentary but functionnal HB camera app.
 
D

Deleted User

Guest
OP
Tested it (N3DS 10.3, *hax 2.5 from 11/9, IronHax,), worked perfectly! That smooth 60fps is great, good job!
Combined to the "Home = Screenshot" function we now have a rudimentary but functionnal HB camera app.

The loop is iterating 60 times per second but the camera max frame rate is 30.

Implementing a way to save the current frame from the camera is not hard and should be more efficient than the "home button screenshot".
I will try to document and explain all of the thing, and improve it to make the camera easier to use.
 

Giodude

GBAtemp's official rock
Member
Joined
May 17, 2015
Messages
5,094
Trophies
1
Age
23
Location
New York
XP
2,761
Country
United States
compiled .3dsx..............................................................? Pls............................................
 
D

Deleted User

Guest
OP
Oh, this is cool! Do you get both cameras with the camera service? Can we develop our AR thingies with this?
Yep, you may use both cameras but it will maybe require some supplementary drawings and then cause a TPS decrease.
 

lolzvid

Well-Known Member
Member
Joined
Dec 26, 2014
Messages
148
Trophies
0
Age
22
XP
278
Country
Brazil
I've tested it on my O3DS 9.2.0-20 (homemenuHax and ninjhax 2.5) and it crashed every single time (needs to power off the system to exit the app)...

:(
 

Urbanshadow

Well-Known Member
Member
Joined
Oct 16, 2015
Messages
1,578
Trophies
0
Age
33
XP
1,722
Country
Yep, you may use both cameras but it will maybe require some supplementary drawings and then cause a TPS decrease.
I think I can cope with that. Roughly 30 fps would be fine. I'm more worried about the picture treatment (otsu, I believe. Ransac would be best but overkill) taking too long to process rather than some drawings.
 

Blundermann

Well-Known Member
Member
Joined
Oct 15, 2013
Messages
174
Trophies
0
XP
410
Country
United States
No, silly me :ha:

Now it's working flawlessly, thanks!
I did forget it, and it starts up fine now!
However, I've run into another issue.

It makes a noise, renders about five or so frames, then the top screen freezes, and the bottom screen continues to draw 59-60.
What do I do?
 
D

Deleted User

Guest
OP
I did forget it, and it starts up fine now!
However, I've run into another issue.

It makes a noise, renders about five or so frames, then the top screen freezes, and the bottom screen continues to draw 59-60.
What do I do?

Looks like a timeout problem, interesting I will test with my O3DS.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: