PropCam and uOLED 128 G2: How to display gray-scale image?
banjo
Posts: 447
in Propeller 1
The autumn darkness has finally dragged me into my hobby corner... and here I find an old friend PropCam and a new friend uOLED 128 G2...
Both of them are working independently with a Propeller Activity Board, I was even able to save a BMP-file from the PropCam to a SD-card.
Has anyone tried to capture an image with PropCam and show it on the uOLED?
I've tried to understand how to format the gray-scale image data to show it on the display, but so far been unsuccessful.
I SPIN a bit and C even better
Both of them are working independently with a Propeller Activity Board, I was even able to save a BMP-file from the PropCam to a SD-card.
Has anyone tried to capture an image with PropCam and show it on the uOLED?
I've tried to understand how to format the gray-scale image data to show it on the display, but so far been unsuccessful.
I SPIN a bit and C even better
Comments
The frame rate is...well...not so impressive, roughly 10-15 seconds per image. The main reason is that I'm drawing pixel by pixel with the uOLED's putPixel-method. I've also tried with the image-method where the frame rate is much better, but I've not been successful in getting the colors correct.
When drawing pixel by pixel I'm using below Spin-code... ...and when using the image-method I've tried below code that changes the colors of every pixel similarly as in the above code I expected that the end result would be similar with both methods, but as said the colors are distorted with the image-method. I get the impression (perhaps incorrect so) that the color mapping is different between putPixel and image methods. I'll try to post a picture later to show what I mean.
I'm only using the 4 high bits from the PropCam picture, by using the 4 low bits I only got confused as the 2-color picture captured by PropCam turned into a too colorful picture.
Would appreciate any input or thoughts on the two above issues.
In addition I'm transferring the PropCam image between two ActivityBoards through XBee HP.
After cleaning up and optimizing the code, I'll try to increase from the default 9600 baud so I could get improve the FPS.
Last time I changed the baud-settings from 9600 baud, I was able to get the two XBee HP-adapters to connect to each other, but transferring 7Kb of data did not succeed for whatever reasons even if the distance was a mere 2 meters.
I probably need to put in some error checking method one way or another, seems there are more things to learn.
I'm not asking for any help right now as I've achieved the minimum goal (transfer a PropCam-image between two Propellers through XBee), but ideas and comments are of course appreciated