hi all ,
I want to convert the images in AR dataset from .raw to .jpeg format
This is dataset http://www2.ece.ohio-state.edu/~aleix/ARdatabase.html
When I use this code :
convert -size 768X576 -depth 8 rgb:m-001-1.raw m-001-1.jpeg
the conversion is successful but the image is 768X576 and there are 6 sub-images (all identical) within this image. it suppose contains only one RGB image
images in AR dataset are 24 bit depth, but when I replace the 8 with the 24, the
conversion fails.
please what is the right command ?
also I want to convert all images in directory in one command , how can I ?
thanks ,
how can convert .raw to .jpeg or another format ?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: how can convert .raw to .jpeg or another format ?
The linked website says "Images are of 768 by 576 pixels and of 24 bits of depth." This probably means the images have three channels, with 8 bits/channel. IM's "-depth" setting is bits per channel, so "-depth 8" is correct.
I don't know why you get 6 images.
To convert all images in a directory, put the convert (or magick) command inside a shell "for" loop.
I don't know why you get 6 images.
To convert all images in a directory, put the convert (or magick) command inside a shell "for" loop.
snibgo's IM pages: im.snibgo.com
Re: how can convert .raw to .jpeg or another format ?
Thanks for your response Mr Snibgo
How do I put a command inside a shell "for" loop ?
I am using Win10
How do I put a command inside a shell "for" loop ?
I am using Win10
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: how can convert .raw to .jpeg or another format ?
Type "help for" at the command line. For example:
JPEG is lossy, so I save to PNG instead. I save the outputs to another directory, which must already exist.
If you use Windows BAT scripts, double every %.
Code: Select all
for %F in (*.raw) do magick -size 768X576 -depth 8 rgb:%F outdir\%~nF.png
If you use Windows BAT scripts, double every %.
snibgo's IM pages: im.snibgo.com
Re: how can convert .raw to .jpeg or another format ?
thank you so much
but how can I fix the problem of converting images to 6 sub-images?
but how can I fix the problem of converting images to 6 sub-images?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: how can convert .raw to .jpeg or another format ?
To answer that I would have to see a sample input file. The linked website claims to link to an example, but the link is broken. It says the full database is available but I need a university email to apply for a password, and each tar is 100 MB which is too large for me to download.
The simple answer is probably to delete the five unwanted images.
The simple answer is probably to delete the five unwanted images.
snibgo's IM pages: im.snibgo.com