Shop OBEX P1 Docs P2 Docs Learn Events
Spinning fozzie demo - New Torture test version — Parallax Forums

Spinning fozzie demo - New Torture test version

ozpropdevozpropdev Posts: 2,793
edited 2016-11-05 23:54 in Propeller 2
Here's a little demo that gives the Cordic and Hub a workout.
Output is 256x192 pixel greyscale NTSC.
Tested on A9 board, should work on DE2 too (Confirmed).

The Cordic resolver is amazing! :)

New Cordic/Hub torture test version - Uses 16 cogs (12 running cordic) (15 blasting hub)
Can be easily modified from 1 to 12 cogs.


Latest Version fozzie_7_v13.zip - 5th November 2016

Comments

  • Looks brilliant!...
  • cgraceycgracey Posts: 14,210
    edited 2016-02-15 04:07
    I want to see this, but I won't be at the shop until morning.

    ...Any quick video available?
  • potatoheadpotatohead Posts: 10,261
    edited 2016-02-15 06:47
    https://drive.google.com/file/d/0ByXsiQ6gZ7o2U2E4RUFKTjl3bzg/view?usp=sharing

    Very nice OZProp! Man, that's a lot of rotations / second!

    @cgracey, it's a short clip, 11Mb. You should be able to fetch it on your phone.

  • r@ozpropdev

    Nice work :)

    @potatohead
    Thanks for the video.


  • cgraceycgracey Posts: 14,210
    potatohead wrote: »
    https://drive.google.com/file/d/0ByXsiQ6gZ7o2U2E4RUFKTjl3bzg/view?usp=sharing

    Very nice OZProp! Man, that's a lot of rotations / second!

    @cgracey, it's a short clip, 11Mb. You should be able to fetch it on your phone.

    Neat! Thanks for posting that, Doug. Good test, OzPropDev.

  • Thanks Tubular for the graphics tip/tweak.
    Thanks Potatohead for posting a video.
    Thanks Bob and Chip.
    Cheers
    Brian

  • Version 4 update - see first post
  • Very neat, if I want a retro style virus that says "Fozzie has been around, you've been hacked" I will be sure to use your demo and give you all the credit! :)
  • rjo__rjo__ Posts: 2,114
    ozpropdev wrote: »
    Thanks Tubular for the graphics tip/tweak.
    Thanks Potatohead for posting a video.
    Thanks Bob and Chip.
    Cheers
    Brian

    dittoes all around. I tried this a while back nearly went blind trying:)

  • rjo__rjo__ Posts: 2,114
    Brian,

    Keep your powder dry on this issue. Once we have sdram support, everything can be pre-calculated and stored as image sized look up tables. This kind of routine is necessary for us to use the P2 as an image stabilizer. Right now, the speed issue would cause a bit of a constraint... depending upon how complicated the stabilization issue becomes. The faster the better, of course:)

    Wonderful stuff.

    Rich
  • rjo__rjo__ Posts: 2,114
    Not that you don't know all of this already:)

    but the first use of the stabilizer will probably be as a feedback source to the gyro's on our favorite quad-copter:)
  • rjo__rjo__ Posts: 2,114
    At that point, you can get smoother reconstructions, by starting with the screen location and then calculating the closest pixel from the image you are rotating. Then you have a choice as to whether or not you want to smooth it or just pick a neighbor... the smoothing can also be pre-calculated. When you do it this way, you would not absolutely need to bring in another table from sdram every time. You can double buffer it all, and amazingly the result doesn't fall apart too quickly. The actual case would have to be tested.
  • rjo__ wrote: »
    Kyle have a look see over in the P2 forum... at the "Spinning Fozzie" thread. I left something for you.

    Regards
    rjo__ wrote: »
    Not that you don't know all of this already:)

    but the first use of the stabilizer will probably be as a feedback source to the gyro's on our favorite quad-copter:)

    As a Robotics/Mechanical Engineer, I'll shamelessly admit that most of this is over my head. But you can bet that as soon as it's available internally, we'll begin working on integrating the P2 in to the ELEV-8 Flight Controller. As far as image stabilization is concerned, processing may be able to compensate for roll/pitch/yaw (though I prefer using a gimbal), but any camera will still require vibration isolation - the vibrations are at such a high frequency that they distort the image within a given frame (hence the "jello" effect).
  • rjo__rjo__ Posts: 2,114
    My thinking is that right now the flight controller is using a conversation between the accelerometer and gyro to know when to null/correct drift errors. A signal from a "stabilizer" process based on imaging can be thrown into the mix... so that when if there a is miss you have an instant backup or it may be used to increase the angular tolerances in the nulling process. I wouldn't call it an image stabilizer... although that's basically how it works.

    Vibration tolerance is always an issue. As you know, the type of camera and the speed are critical. The only one that I know that is inexpensive enough, has the right kind of shutter, and is fast enough is the one that Parallax sells:)

    I have satisfied myself that blurring isn't as much of an issue as I originally would have thought. I'm working with largely static images right now. Once we have SDRAM working and I've had a chance to see it all work together, I'll buzz you again. In the meantime talk to Phil about it. His camera isn't perfect(nothing ever is:), but it might get the job done.
  • If you're talking about motion tracking for the purpose of stabilizing a craft, it's been done, but rotating pixels doesn't have much to do with it. It's correlating features across multiple frames, trying to figure out which blobs of pixels are similar from frame to frame, and quantifying their movement. It's a very different problem, unless I'm misunderstanding you here.
  • Really nice improvement there Brian

    I ran some checks with the power meter attached, there seemed to be only 17 milliWatts increment per cog (1 cog 4.37W, 11 cogs 4.67 watts), which seems incredibly low to me.

    Initially it looked like 30 milliwatts per cog but the red leds and their associated resistor consume about 13mW when lit to indicate that cog is active.

    I'm measuring the AC so it includes some small losses in the switchmode PSU, as well as some losses due to WS2812B leds still remaining lit from the bootup test code, but the incremental amounts should be valid

    Looks good
  • rjo__rjo__ Posts: 2,114
    Jason,

    Yes. That's what I'm trying to say. You are right, it can be done without rotating pixels... but pixel rotation will give you about a 10x improvement if you are doing the correlation right. Either way, the P2 will be able to handle it:) A major entertainment company called me a liar when I showed them the results in a different context.

    I don't have Phil's camera, but I'm about to fix that situation. If you could borrow one and put it on a quad and get some typical images... that would be fabulous.

    You have sparked my memory... and thank you for that:)

    Rich
  • rjo__rjo__ Posts: 2,114
    Jason,

    Yes. That's what I'm trying to say. You are right, it can be done without rotating pixels... but pixel rotation will give you about a 10x improvement if you are doing the correlation right. Either way, the P2 will be able to handle it:) A major entertainment company called me a liar when I showed them the results in a different context.

    I don't have Phil's camera, but I'm about to fix that situation. If you could borrow one and put it on a quad and get some typical images... that would be fabulous.

    You have sparked my memory... and thank you for that:)

    Rich
  • @Tubular
    Thanks for the power numbers.
    I was curious on number of cogs to power usage.
    A9 surface temp seems to be sitting at around 40 degrees C.

    @rjo
    Some interesting ideas there.
  • Yes I noticed it was running cool to touch too, hence checking the power figures

    Actually none of the programs I tested (ntsc, vga, all cogs blink, smart pin serial) broke 5 watts

  • rjo__rjo__ Posts: 2,114
    Brian... not sure and am certainly not going to figure it out to night.
    I think I might have read your routine backwards... tomorrow will tell:)
  • cgraceycgracey Posts: 14,210
    edited 2016-02-17 12:25
    Wow! That's a lot faster now.

    This looks a lot better if you make this change to cancel the colorburst reference:
    'c_cb		long	$507000_01		'colorburst reference color
    c_cb		long	$000000_01		'no colorburst reference color
    

    If TV's don't see the colorburst, they go into to nice greyscale mode.
  • Here's an updated version for the V10a FPGA image.
  • cgraceycgracey Posts: 14,210
    ozpropdev wrote: »
    Here's an updated version for the V10a FPGA image.

    Thanks. I hope to have the ROM code done tomorrow, so we can get a more final FPGA image out.
  • video of the faster/better version, or it didn't happen!
  • pedward wrote: »
    video of the faster/better version, or it didn't happen!



Sign In or Register to comment.