This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Image re-sizing using TM4C123GH6PM microcontroller in Keil IDE

Other Parts Discussed in Thread: TM4C123GH6PM, LM324

Hello Everybody,

I am Sreenivasa S, working as SE in XXX company, I am using the TIva C series MCU(TM4C123GH6PM)  for reducing the size of the image.

our need:

API which reduces the image size depending on the input parameter. EX: if we have 1MB image file as input then output should be of either 500KB image(50% of original image) or 250KB(25% of original image)  depending upon the input parameters to the API.

I searched for API, but I could not get any source code for our requirement, If any one has an idea or the open source please share with me. I will be much thankful. Even though exact source code not available please help me some algorithms which I can use...

Thanks in advance...

Sreenivasa.

  • Sreenivasa,

     

    This automotive forum is mainly used for our analog devices. If you are looking for source code, you should be in the Tiva section of the forum. I will move you there.

  • sreeni siddu said:

    our need:

    API which reduces the image size depending on the input parameter. EX: if we have 1MB image file as input then output should be of either 500KB image(50% of original image) or 250KB(25% of original image)  depending upon the input parameters to the API.

     In first STOP POST same imprecise post!!!!

     None can help you your question is so silly we cannot respond missing too many detail, how image format is how image reduction has to be applied... What is image reduction in your task? A similar more and more complex was my first programming exam... So you are a software engineer and cannot apply for a few time to solve this problem?

     Is simple cut the file in half or a quarter...

     This answer is at level of your request . sorry is more better it can be realized!

  • Roberto,

     

    I believe that Sreenivasa is wanting some example code for image compression. I think he was having trouble finding the correct forum to post and therefore multiple requests ended up here. I implore you to be more understanding of the situation. I am responsible for analog apps and cannot help here, however this is a fairly simple request for example code. I do not appreciate you referring to this question as silly as I would have a similar question if I was trying to put together compression code as well.

    Sreenivasa,

    Do you have a specific image format that you are trying to compress?

  • Alexander Scheuermann said:
    I believe that Sreenivasa is wanting some example code for image compression. I think he was having trouble finding the

     
     Alexander, thank for this appoint, we are all extremely tired of all question someone pose there. If I ask you to use an LM324 to process the throttle valve from digital phonic wheel of odometer what you answer to me if posting again and again same question? Sorry Alexander this forum is no more usable and need stop this worst issue of multiple posting and question impossible to answer, when we try ask more detail we see forever is impossible to answer and no knowledge start from question like this.

     This question is impossible to answer, Is using compression? is Asking scaling? Is asking to do my first exam do averaging of nearby pixels? is some way of bilinear conversion?

     Size and conversion.. is image raw? is compression lossy acceptables or lossless?

     Alexander, sorry you are analog, try read nanosecond generator or similar... Or 24bit DAC how ended...or the one trying to do a cheap DSP solution on dual TIVA moving code from a twin MAC DSP where DSP processor cost less than TIVA and TIVA cannot do 250MMACS ? Sorry Alex WE are tired see beginner try explain me the Z domain and never have knowledge to sustain conversation.

     Automotive require skill and certification so if you decide read be prepared to have some horror from what you see.

    Alexander Scheuermann said:
    Do you have a specific image format that you are trying to compress?

     Welcome to our neverending everyday job start.

  • Hello everyone,

    First of all I apologize  for posting in wrong forum.

    Alex Scheuermann

    I need to compress the Image of JPEG format. I can use any algorithm and should be loss less compression.

    Since I am new to the file handling system, I am not aware of the cutting file half/quarter.

    Thanks for your valuable time.

  • Hi,

    Sreeni, it would be useful to add several words to explain why do you need to do such complex processing at the restrained computing power of TM4Cxxx processor - maybe you need to compress a jpeg file to make a picture to be used with software for this processor?

    Petrei

  • Hi Petrei,

    Thanks for you earliest reply,

    Actually I need to get the image file from the SD card to MCU through SPI interface and then I need to do the image resize or reduction and then send the image to the CDMA module, which intern send to server.

  • Hi, 

    But that is a job for a powerfull PC, Tiva has not much power, or it will take a long time to accomplish such task; the RAM memory is very small on TM4C123x micros, maybe too small. One more thing - maybe you have the algorithms to do that - but if I am not wrong, jpeg software is with some problems (licencing) so I suggest to process the files on PC before saving on SD card and sending as you wish. A free program to do that could be GIMP.

    Petrei

  • hi Petrei,

    Thanks for the suggestion I will discuss this my TL.

  • Perhaps it should be noted that a .JPG file is already in compressed format.  Note that posts here have included mention of both, "compression and scaling" - indeed these are different - and require vastly different treatment.

    We've heard of a newer compression method/means which (allegedly) exceeds the compression achieved under .JPG.  This may warrant inclusion in your search/consideration efforts...

    Poster Petrei's guidance re: "using the most appropriate "tool" for the task" is spot on.  MCUs here (and similar M family, elsewhere) are more than a bit, "out of their league" in solving the problem posted here...

  • cb1- said:

    We've heard of a newer compression method/means which (allegedly) exceeds the compression achieved under .JPG.  This may warrant inclusion in your search/consideration efforts...

     Hi CB1, Alexander are still you reading?

     After all we don't know input format seems be in JPG so it require a lot of ram to decompress to raw and a so low entry processor cannot do in short time nor can manage at few 10-100 times the compressed size file.

     Again a DSP class is required to do this and try apply a more better compression.

     Poster again say it need LossLess compression.. This is IMPOSSIBLE from JPEG, a lossy compression using art of what human eye perceive.

     What is asked is to reduce size of a compressed JPG file, we don't know nothing, if LossLess is required so no resolution reduction nor DCT detail nor PC nor DSP nor Multidimensional nor wavelet compression can do a miracle.

     Thank Petrei pointing the issue of patent, Joint Picture Expert Group is doing some move away like it was from MPEG to continue without the Fraunhofer imposed limit.

     This is another effort wasting post.