December 20, 2014
Hot Topics:

Advice for Android Image Processing, Page 3

  • Updated: January 9, 2012
  • By Chunyen Liu
  • Send Email »
  • More Articles »

Some Advice for Android Image Processing

Before you jump into image Android image processing, here are some pointers to keep in mind:

  • If it takes too long to process all the image pixels (approximately five seconds), you could get a popup dialog called Application Not Responding or ANR. You should create a child thread and do the complicated calculation there. That should keep the main thread running without interruption.
  • If the child thread needs to change the main view (called UI thread), you should use a message handler in the main thread to listen for the notification from the child thread and then update the view accordingly. A child thread cannot modify the view in the main UI thread directly.
  • Some enhancements can be made. For example, it can be modified to read the image file from browsing the folders or from a URL. Image animation can be done carefully through multi-threading and message handling along with rectangle clipping to produce smooth transition effects.

Conclusion

Hopefully, the information provided here has given you a rough idea of how Android image processing works. I hope you develop a neat image application for the Android platform with your own unique style. From Eclipse, you can create a new Android project by selecting "Creating project from existing source" and browse to the folder where the sample project is decompressed to.

References

  1. Download and save the entire software project
  2. Android Developers at: http://developer.android.com/
  3. Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing, Addison-Wesley Publishing, 1994

About the Author

Chunyen Liu has been a software professional for many years. Some of his applications were among winners at programming contests administered by SUN, ACM and IBM. He has also co-authored U.S. patents, written articles, and reviewed books for various publishers. He holds advanced degrees in Computer Science and has written numerous hobby apps at Androidlet and The J Maker. On the non-technical side, he is a tournament-ranked table tennis player, certified umpire, and certified coach of USA Table Tennis.





Page 3 of 3



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Rocket Fuel