Shop OBEX P1 Docs P2 Docs Learn Events
FryView image viewer — Parallax Forums

FryView image viewer

vampyrevampyre Posts: 146
edited 2008-06-22 18:37 in Propeller 1
LOL, i just re-read the topic subject for this post (image viewer-audio help needed).... had to delete that since it belongs to another thread now anyway, but i just realized how funny it sounded

anyway, update: fryview2b attached, updated june-22-08

Updated version (fryview 2) attached. update june-7-08


This is a modification of OBC's SpudView.
It allows you to view bitmap images with your prop on a TV

requirements:
Prop hooked up to an SD card, NTSC tv and a keyboard


This version allows you to convert .PPM images into a propeller friendly format, .pgf (prop graphics format)
after the conversion which does take a lil time, you can view them really quickly with fryview
full instructions are included in the readme.txt

I'm also posting an image to show the improvements i've made to the color conversion code. Eventually I'll be turning this into a video player.

Post Edited (vampyre) : 6/22/2008 8:06:28 AM GMT
568 x 478 - 69K
«1

Comments

  • BaggersBaggers Posts: 3,019
    edited 2008-06-06 10:45
    excellent work vampyre, looks really good. [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-06 12:53
    NICE!!

    Fryview... heh.. Will the video player be called deepfry? [noparse]:)[/noparse] [noparse]:)[/noparse]

    Awesome job.. Looking forward to playing with this, this eve..

    OBC


    Edit:
    Had to take a quick peek at your code.. Looks faster than Spudview.
    (But you cheated.. You used logical math to determine color, while
    spudview used conversion tables based on screen/color comparison. [noparse]:)[/noparse] [noparse]:)[/noparse]
    I like your method better.. )

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange

    Post Edited (Oldbitcollector) : 6/6/2008 1:57:45 PM GMT
  • BeanBean Posts: 8,129
    edited 2008-06-06 15:26
    Have you tried using something like a bayer dither to make images better ?
    I think it would help alot.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?

    www.iElectronicDesigns.com

    ·
  • ForrestForrest Posts: 1,341
    edited 2008-06-06 16:30
    In your screenshots, the 'happy sun' changed from bright yellow (original) to tan (Spudview) to dark brown (Fryview) with red eyes. The Spudview sun looks closer to the original. Isn't yellow available in Fryview?
  • vampyrevampyre Posts: 146
    edited 2008-06-06 18:30
    Thanks for the replies [noparse]:)[/noparse]

    Forrest: your right. Spudview still does a better job converting cartoon-like images which is why i included the house pic for comparison. I think it has to do with my lazy brightness detection. i'm going to tweak that a bit before i start converting this to a video player.

    Bean: thats not a bad suggestion. I'd planned to implement a greyscale option when converting, i belive i'll add a dithering option as well. thanks for the tip

    planned features include an image browser, and the ability to fine tune image conversion settings

    oh, and i figured out why fryview was taking so long to display images. i was having a homer simpson moment, i had forgotten to delete a delay i had put in the code for debugging . DOH! blush.gif

    Post Edited (vampyre) : 6/6/2008 6:38:21 PM GMT
  • vampyrevampyre Posts: 146
    edited 2008-06-07 10:33
    Updated version is posted in the first post

    There have been some updates to both the converter and the viewer
    The viewer now allows you to scroll through all the images on your SD card, instead of only showing one at a time.

    The converter saw the most change.
    it now converts yellows correctly
    it also now has a settings menu, that allows you to 'fine-tune' the conversion process for each image.

    so now you can take all the saturation out for black and white, or increase the brightness, etc
    the readme contains detailed instructions for those who actually read readme's

    Hope you guys enjoy it half as much as i have coding it
    this will probably be the last update before it becomes "DEEPFRY" , the video player
    thanks for the name suggestion OBC [noparse]:)[/noparse]
    OBC said...

    you cheated.. You used logical math to determine color, while
    spudview used conversion tables based on screen/color comparison. [noparse]:)[/noparse]

    -I only now just saw this edit. hehe yeah. I think thats why yours still does better with low-color images. brute-force works well in that situation Not sure if the converter is any faster, espeically now, but the seperate viewer negates conversion time. Another thing I changed in your code was your handle from IBC to OBC (and again from OBO to OBC).... i'm guessing those were typos, unless you have two secret lives we dont know about? hmmm?

    Post Edited (vampyre) : 6/7/2008 10:45:03 AM GMT
  • BaggersBaggers Posts: 3,019
    edited 2008-06-07 11:27
    Nice work vampyre, let me know if you get stuck or want any help doing the video side

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-07 11:39
    i'm sure i'll come running for help at least once, thanks for the offer. I'm curious, what conversion method do you use for color? My code converts the input to HSV, and then assigns color palette colors with that info... is that how you do it?
  • BaggersBaggers Posts: 3,019
    edited 2008-06-07 11:44
    No probs [noparse];)[/noparse]

    As for colour conversion method, your method isn't quite how I did it, lol, I just got RGB value and looked for nearest colour in prop's palette, turned out pretty ok, considering [noparse]:)[/noparse]

    I might try another one with your method, if that's ok with you ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-07 23:54
    sure thats fine, maybe i can convince you to share your new color conversion code when your done with it so we can compare them? i'm still not quite happy with mine the way it is.

    hint: stay away from wikipidea if you go searching for info on how to convert to HSV. bugs in their formula drove me crazy for two days before i realized it was their formula that was not right.
  • BaggersBaggers Posts: 3,019
    edited 2008-06-08 07:27
    lol, thanks for the tip.
    And yes, I'll share the conversion when it's done.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-09 15:47
    just a quick update, played my first video file today. no audio yet. The video runs surprisingly well without double buffering. I'm starting to think that the prop is made out of magic dust. I'm not releasing anything yet because i'm still using the prop itself to convert the files, and converting video on the prop is an exercise in sadomasochism.

    I would have gotten done a lot earlier but i've been completely hooked on this JETPAC game.

    tomorrow I'll re-install my C compiler (since my drive crashed) and port the converter code, then start working on audio interleaving.
    look for a initial release in the next few days.
  • BaggersBaggers Posts: 3,019
    edited 2008-06-09 17:28
    Lol, yes converting video on prop is an exercise in sadomasochism, lol ps, what video did you convert? and out of curiosity, was it a load of stills? or an avi?

    lol at JETPAC [noparse];)[/noparse] glad you like it and are finding it addictive lol

    I shall wait patiently for your initial release [noparse]:)[/noparse] I won't hold my breath though as a few days of not breathing can make one rather ill lol.

    Jim.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • PerryPerry Posts: 253
    edited 2008-06-09 19:29
    Have any of you guys looked at my "stupid video capture".

    The prop can capture video with only a sync separator and the sigma/delta conversion, I have a demo showing B/W video in real time from NTSC inputs.

    The code consist of a "display cog", a "capture cog" to get raw video data, and a "process cog" to manipulate data for presentation.

    The process cog does a weird nth root of the input and dumps it into the display buffer to produce fair quality B/W images.



    Perry
  • vampyrevampyre Posts: 146
    edited 2008-06-10 09:10
    Perry:
    No i hadn't seen that. Thanks a lot for mentioning it, I never would have thought it possible.. thats pretty wild. Is the code for it posted somewhere, i couldn't find it with a search

    Baggers:
    no no, dont hold your breath, a dead baggers doesn't bode well for PropGFX and at this point if i dont get my propGFX i'm gonna cry. For the first run i'm just converting a series of images, i dont want to spend my time hunting down the file format for .AVI
    Once i get the prop playing video with interleaved audio, i'll finish it up and do it right.

    The video i converted was a video of my kids playing in my front yard. Looks terrible at only 80x96, but i'm not smart enough to figure out how you did 120x96. My guess is that the best way for me to accomplish that is to use 160, and then just make the images themselves 120, centered on the screen using bytefills. Seems like that would be unnecessarily slow though.
  • ColeyColey Posts: 1,110
    edited 2008-06-10 10:25
    Perry's "stupid video capture" .... (not stupid if you ask me!!) smile.gif

    http://forums.parallax.com/showthread.php?p=686552

    Nice work Perry!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite
  • BaggersBaggers Posts: 3,019
    edited 2008-06-10 11:58
    Vampyre, yeah that would be bad for PropGFX lol [noparse]:)[/noparse]
    Have you changed the display driver to be 80? or are you doubling up the pixels? do you know how to change it to 120? if not, I can do that for you, it'll save you doing slow unnecessarily slow byte fills. [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • PerryPerry Posts: 253
    edited 2008-06-10 19:24
    Have not published the live video version yet. The horizontal resolution is only 72 dots.

    I am working with a capture of 72x192, display on potatohead--hi-color-80x96.
    even with infrared remote, and fsrwFEMTO I still have over 700 longs of memory available.

    Will try to add another sigma/delta A/D for audio.


    Perry
  • vampyrevampyre Posts: 146
    edited 2008-06-11 10:20
    I'm about half way done with the converter. Things have been slow lately, got a head cold or something.

    Perry:
    thats really amazing stuff, thanks coley for the link. I can think of so many uses for that its not even funny. Machine vision, portable battery powered security cams , etc. whats really great about it is the affordability. Its almost disposable.

    Baggers:
    Yes at this point the display driver has been modified to be 80x96. I'm currently using the modified version of potatoheads driver that comes with spudview, that version is easy to change to multiples of 160 horizontal pixels. If you could put together a 120x96 version that would be awesome. I dont know how to do that without making the screen go all funny.

    I looked into the .AVI file format and, ouch. Did you use a library for your converter or do you parse them manually? I'm still using loads of still images that have been spat out by virtualdub.
  • BaggersBaggers Posts: 3,019
    edited 2008-06-11 12:46
    Hi vampyre,
    ok, I'll convert the driver from the one in fryview2 for you, and post back on here.
    as for the .AVI, I had no idea about the file format, as there are many many codecs, so I decided to reverse engineer the uncompressed avi, as I knew it'd have to have a raw image data in there somewhere [noparse]:)[/noparse] and managed to sort out how it was stored [noparse]:)[/noparse] the only drawback, is with it being uncompressed, the AVI's get rather large lol so I just convert the current vid i'm converting from compressed, to uncompressed, then convert it with my converter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • BaggersBaggers Posts: 3,019
    edited 2008-06-11 12:56
    Was thinking, would you want to use my modified Parallax drivers, so that it uses PAL and NTSC?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-11 13:03
    If you dont mind sharing the PAL/NTSC driver, that would be great.
  • RaymanRayman Posts: 14,162
    edited 2008-06-11 13:06
    Just FYI:

    Irfanview is a nice tool for extracting frames from animated GIF or avi files...· Also, you can crop, resize, and/or convert image format in batch mode.


    Ray
  • BaggersBaggers Posts: 3,019
    edited 2008-06-11 13:42
    try that one for now, I've just modified the current driver to display 120, by bringing the borders in to keep the current aspect ratio, instead of stretching it too much.
    I've also put two headers in the sources I've modified, fryview2.spin and potatohead--hi-color-raster-blah.spin for setting hybrid·or proto/demo setups.
    I've also, made a change to the image loader, as I didn't have any 120x96 images in PPM / PGF format, so I made it read in the data for each line, and skip 40 bytes [noparse]:)[/noparse]

    Baggers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
  • BaggersBaggers Posts: 3,019
    edited 2008-06-11 13:52
    vampyre, is this one OK? or do you want the PAL/NTSC one instead?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-11 16:33
    more than ok, this one is very nice indeed, thanks so much baggers. I'm almost done with the new converter so i should have something posted tomorrow with this new modified version of the display driver ,the new converter and a youtube vid. thanks again [noparse]:)[/noparse]

    Rayman:
    I had no idea irfanview could handle extracting images from AVI's, that cuts out a whole step, thanks for the info. I've been using virtualdub followed by irfanview. And I havn't yet used it , but thanks in advance for the wav file player you made that i'll be shamelessly stealing, mangling and then squishing into the video player smile.gif
  • BaggersBaggers Posts: 3,019
    edited 2008-06-11 16:36
    You're very welcome vampyre [noparse]:)[/noparse] I look forward to your posts [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-12 09:14
    quick update:
    So progress has been slow, I'm gonna go ahead and blame it on my headcold. yeah thats the ticket. I got stuck on another one of those mind-numbingly simple bugs that i just couldn't figure out because it was too obvious. didn't figure it out till right before bed,so there wont be a release today. I will however post something on youtube and link it here later
  • BaggersBaggers Posts: 3,019
    edited 2008-06-12 09:15
    cool, nice one vampyre.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • PerryPerry Posts: 253
    edited 2008-06-12 15:56
    Thanks Baggers, I had a problem 'cause I could not seem to do video and fsrw at the same time.

    Your update for 120x96 pointed out the "debug Led" code that would interfere with the fsrw on pins 0.1.2.3

    I now have a primitive B/W video capture/play to the SD card on the proto board

    Perry
Sign In or Register to comment.