LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-26-2007, 07:19 PM   #1
green_dood
Member
 
Registered: Nov 2007
Location: Puebla, Mexico
Distribution: Ubuntu, DSL, Fedora
Posts: 45
Blog Entries: 1

Rep: Reputation: 15
Image manipulation - binarization!


Hi i have some question about manipulation of images.

The situation is that we have a plain bitmap image (bmp). We want to

1.-convert it to black & white (monochrome)
2.-Get instead of the common black & white image, a ... hmmm how can i call it "binarized" image , you know having a bidimentional array of 0's and 1's , so we can apply some personalized algorithms.

I have accomplished the first step with imagemagick (mogrify -monochrome file) but i would like to know if there is a program or recommended approach to convert each one of those black/white pixes into 0's and 1's


Sorry about my english, not native.
 
Old 11-27-2007, 12:00 PM   #2
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
Dood, bmp is pretty simple.
 
Old 11-28-2007, 08:22 AM   #3
green_dood
Member
 
Registered: Nov 2007
Location: Puebla, Mexico
Distribution: Ubuntu, DSL, Fedora
Posts: 45
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Thanks!! I'm checking it out. Im telling what happens next.
 
Old 11-28-2007, 10:04 AM   #4
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
Ok, do tell.
 
Old 11-28-2007, 05:28 PM   #5
green_dood
Member
 
Registered: Nov 2007
Location: Puebla, Mexico
Distribution: Ubuntu, DSL, Fedora
Posts: 45
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Ok, basically i need to find a way to access this RGBQUAD array in a monochrome bitmap and check the lower and higher parts of all the bytes... with this info I could decide to turn each byte into a pair of 0 or 1 right?
 
Old 11-29-2007, 06:40 AM   #6
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
Here's the php way to convert a picture to monochrome: http://www.captchakiller.com/php-convert-monochrome
 
  


Reply

Tags
bitmap, imagemagick, manipulation


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
image manipulation by script rblampain Programming 17 11-19-2007 09:58 PM
Resource for image manipulation surfer41 Programming 1 05-23-2007 07:31 PM
Best image manipulation library? dezert_fox Linux - Software 1 07-26-2006 02:15 AM
Batch image manipulation elfoozo Linux - Software 5 06-03-2005 06:22 PM
[C/C++] Image manipulation Cornholio Programming 2 03-06-2005 11:46 AM


All times are GMT -5. The time now is 04:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration