LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 11-26-2007, 08:19 PM   #1
green_dood
Member
 
Registered: Nov 2007
Location: Puebla, Mexico
Distribution: Ubuntu, DSL, Fedora
Posts: 33
Blog Entries: 1
Thanked: 0
Image manipulation - binarization!


[Log in to get rid of this advertisement]
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.
green_dood is offline  
Tag This Post , ,
Reply With Quote
Old 11-27-2007, 01:00 PM   #2
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254
Thanked: 0
Dood, bmp is pretty simple.
kotnik is offline     Reply With Quote
Old 11-28-2007, 09:22 AM   #3
green_dood
Member
 
Registered: Nov 2007
Location: Puebla, Mexico
Distribution: Ubuntu, DSL, Fedora
Posts: 33
Blog Entries: 1
Thanked: 0

Original Poster
Thanks!! I'm checking it out. Im telling what happens next.
green_dood is offline     Reply With Quote
Old 11-28-2007, 11:04 AM   #4
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254
Thanked: 0
Ok, do tell.
kotnik is offline     Reply With Quote
Old 11-28-2007, 06:28 PM   #5
green_dood
Member
 
Registered: Nov 2007
Location: Puebla, Mexico
Distribution: Ubuntu, DSL, Fedora
Posts: 33
Blog Entries: 1
Thanked: 0

Original Poster
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?
green_dood is offline     Reply With Quote
Old 11-29-2007, 07:40 AM   #6
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254
Thanked: 0
Here's the php way to convert a picture to monochrome: http://www.captchakiller.com/php-convert-monochrome
kotnik is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 10:58 PM
Resource for image manipulation surfer41 Programming 1 05-23-2007 08:31 PM
Best image manipulation library? dezert_fox Linux - Software 1 07-26-2006 03:15 AM
Batch image manipulation elfoozo Linux - Software 5 06-03-2005 07:22 PM
[C/C++] Image manipulation Cornholio Programming 2 03-06-2005 12:46 PM


All times are GMT -5. The time now is 04:34 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration