Convert png image fingerprint to minutiae xyt fingerprint format - image-processing

I am following Minutiae cylinder code paper and it uses ISO19794-2 or xyt format for minutiae. I tried NIST BIOMDI and NBIS. Both didn't work.

Have you tried mindtct distributed with NBIS.
$ ./bin/mindtct -b ./sd09/vol_01/sd09/vol_01/crd_0000f/crd_0000f_01.png ./outf
Will generate a bunch of files including ./outf.xyt.

Related

Convert Dicom Image to JPG

I am trying to convert a dicom file to JPG which I would then use to show as thumbnail for the dicom file. I am using the code below to convert the dicom file but When I execute it I get the following error
'write': no encode delegate for this image format `' # error/constitute.c/WriteImage/1272 (Magick::ImageMagickError)
I am using ruby version 2.7.0 and I have installed ImageMagick 7.1.0-4 and the supportive gems. How to solve this error?
require 'dicom'
require 'rmagick'
include DICOM
dcm = DObject.read("sample.dcm")
image = dcm.image(:frame => 5)
image.normalize.write("test.jpeg");
I had to reinstall ImageMagick-7.1.0-26 along with libgdcm-tools on my system and the above mentioned code worked fine. So Imagemagick needs these additional libraries (libjpeg62-dev, libtiff-dev, libpng-dev, libpng12-0 and libgdcm-tools) to work with these image types. I don't know if this is correct or not but that the problem I was facing has been resolved by following this approach. Here are some of the links which helped me in solving this
Install ImageMagick with JPG TIFF and PNG Delegates
How to configure and build with libgcdm for lossless jpeg conversion
and dicom support

Extract/Convert an (multi-file)image that converted

I have a file made with a program , an image sticker maker .
I know this program saves it's images(probably an image, a bg and a mask) into single file with extension ".adf" .
I couldn't convert the output file with image magick cause of below error :
convert: no decode delegate for this image format `output.adf' # error/constitute.c/ReadImage/532.
I don't know how this Image converted with Image magick .
it's my -list configure result :
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
Path: configure.xml
Name Value
-------------------------------------------------------------------------------
CC vs10
COPYRIGHT Copyright (C) 1999-2011 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
FEATURES OpenMP
HOST Windows
LIB_VERSION 0x671
LIB_VERSION_NUMBER 6,7,1,0
NAME ImageMagick
RELEASE_DATE 2011-07-15
VERSION 6.7.1
WEBSITE http:// www.image magick.org
I attached the file :
src.adf
* EDIT *
if I run file command on src.adf it tells :
root#MexHex-PC:# file -vv src.adf
file-5.25
magic file from /etc/magic:/usr/share/misc/magic
What's missed !?
Thanks
This src.adf looks like a very minimal & flat data file. I know nothing about Dalahoo3D and/or ArcGis products, but we can quickly extract the embedded images with python.
import struct
with open('src.adf', 'rb') as f:
# Calculate file size.
f.seek(0, 2)
total_bytes = f.tell()
# Rewind to beging.
f.seek(0)
file_cursor = f.tell()
image_cursor = 0
while file_cursor < total_bytes:
# Can for start of JPEG.
if f.read(1) == b"\xFF":
if f.read(3) == b"\xD8\xFF\xE0":
print("JPEG FOUND!")
# Backup and find the size of the image
f.seek(-8, 1)
payload_size = struct.unpack('<I', f.read(4))[0]
# Write image to disk
d_filename = 'image{0}.jpeg'.format(image_cursor)
with open(d_filename, 'wb') as d:
d.write(f.read(payload_size))
image_cursor += 1
else:
f.seek(-3, 1) # Back cursor up, and try again.
file_cursor = f.tell()
Which dumps the following three images...
I'm sure this file was made with Imagemagick. I had already seen that one would convert the file to tiff image. He told me to do this with Imagemagick but did not explain the method.
I'm guessing this is just a matter of miscommunication. It's true that ImageMagick commonly handles JPEG / TIFF formats, but not geographic information systems and/or 3D modeling. That's usually extended by a vendor -- like ArcGIS. I would bet that ImageMagick is present in the workflow of generating TIFF files, but .ADF wouldn't be supported by ImageMagick until someone writes a delegate coder.
Update
From this question, it looks like you'll need to extend ImageMagick delegates to call GDAL utilities. You'll need to update the delegates.xml file to call the correct utility.

Apply XMP photo manipulation in ImageMagick

I want to automatically manipulate images with ImageMagick (or any other tool that can be run on an Ubuntu server or called via an API). In order to get exactly the result I want, I have tinkered with Photoshop and exported the XMP metadata to document the manipulation. It looks like this:
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c007 1.136881, 2010/06/10-18:11:35 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/"
crs:Version="7.0"
crs:ProcessVersion="6.7"
crs:Sharpness="38"
crs:LuminanceSmoothing="0"
crs:VignetteAmount="-17"
crs:VignetteMidpoint="32"
crs:SplitToningShadowHue="0"
crs:SplitToningShadowSaturation="0"
crs:SplitToningHighlightHue="0"
crs:SplitToningHighlightSaturation="0"
crs:SplitToningBalance="-15"
crs:ParametricShadows="-14"
crs:ParametricDarks="-16"
crs:ParametricLights="+4"
crs:ParametricHighlights="+31"
crs:ParametricShadowSplit="25"
crs:ParametricMidtoneSplit="50"
crs:ParametricHighlightSplit="75"
crs:SharpenRadius="+0.5"
crs:SharpenDetail="100"
crs:SharpenEdgeMasking="17"
crs:PostCropVignetteAmount="0"
crs:GrainAmount="24"
crs:GrainSize="2"
crs:GrainFrequency="6"
crs:LensProfileEnable="0"
crs:LensManualDistortionAmount="-2"
crs:PerspectiveVertical="0"
crs:PerspectiveHorizontal="0"
crs:PerspectiveRotate="0.0"
crs:PerspectiveScale="100"
crs:Exposure2012="-0.05"
crs:Contrast2012="0"
crs:Highlights2012="+27"
crs:Shadows2012="+18"
crs:Whites2012="+29"
crs:Blacks2012="+1"
crs:Clarity2012="+6"
crs:ToneCurveName2012="Linear"
crs:LensProfileSetup="Auto"
crs:HasSettings="True">
<crs:ToneCurvePV2012>
<rdf:Seq>
<rdf:li>0, 0</rdf:li>
<rdf:li>255, 255</rdf:li>
</rdf:Seq>
</crs:ToneCurvePV2012>
<crs:ToneCurvePV2012Red>
<rdf:Seq>
<rdf:li>0, 0</rdf:li>
<rdf:li>255, 255</rdf:li>
</rdf:Seq>
</crs:ToneCurvePV2012Red>
<crs:ToneCurvePV2012Green>
<rdf:Seq>
<rdf:li>0, 0</rdf:li>
<rdf:li>255, 255</rdf:li>
</rdf:Seq>
</crs:ToneCurvePV2012Green>
<crs:ToneCurvePV2012Blue>
<rdf:Seq>
<rdf:li>0, 0</rdf:li>
<rdf:li>255, 255</rdf:li>
</rdf:Seq>
</crs:ToneCurvePV2012Blue>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
Now I would like to apply exactly the same manipulation with a tool that can be run server-side. Is it possible ? Can I achieve exactly the same result with ImageMagick ? Does Photoshop expose an API, or maybe a SDK allowing me to do that ?
I think it would be a pretty massive ask of ImageMagick to achieve identical results, or even close, to those achieved by Photoshop.
Adobe puts massive development effort into ACR (Camera Raw) and things like lens profiles require vast amounts of testing and management of databases of lens characteristics on different cameras which are just not part of the remit or objective of ImageMagick.
Also, ImageMagick delegates the RAW processing to UFRAW and I don't believe that supports advanced features like "Clarity" and "Luminance Smoothing".
Photoshop does expose an API which is scriptable - Adobe Photoshop Scripting in JavaScript, AppleScript and VBScript.
One way to accomplish this for RAW photos is to use the free Adobe DNG Converter (available for both Windows and macOS, but the Windows version might run with wine).
When you ask it to convert a RAW to a DNG you can have it embed a full size JPEG preview in the DNG. It will respect whatever settings are in the XMP when generating the JPEG preview. You can ask it to convert a DNG to a second DNG as a way to update the embed preview. And it works from the command line.
Then use something like ExifTool to edit the XMP metadata, and to extract the embed JPEG preview.
I've used this with reasonable success to create a barebones RAW converter:
https://github.com/ncruces/RethinkRAW

Is there a way to read/write XMP metadata using imagemagick?

I would like to read/write XMP metadata in JPEG and PNG files.
I'm able to do this using the exiftool
~ $ exiftool -xmp-dc:description="FooBar" sample.png
1 image files updated
~ $ exiftool sample.png | grep "Description"
Description : FooBar
However, I'm not able to read the XMP Metadata using imagemagick
~ $ identify -verbose sample.png | grep "Description"
My reason to write XMP metadata is that so it can be read by Adobe Products.
Question
Is there a way to read/write XMP metadata using imagemagick?
What you want to ask is "does ImageMagick support reading or writing XMP (descriptive) metadata?". The answer to that question, from reading the documentation, is no. ImageMagick reads (almost) all metadata from a file, but not descriptive metadata.
If for some reason you must use ImageMagick to extract XMP metadata, you could try to include a filter. Filters can be configured to process image files, but they are not part of ImageMagick itself.
convert -ping yourimage.jpg XMP:-
Access XMP data can be done as follows:
ImageMagick.XmpProfile xmp = image.GetXmpProfile();
Console.WriteLine("\n\n----> xmp:" + xmp);
if (xmp != null)
{
you have to process the XML data of the XMPs result.
ie. use XPATH or some other XML interface.
}

Converting images to .xcf format

Is it possible to convert an image, or batch of images, to a .xcf or .psd file? Using ImageMagick's convert tool didn't work, but so far my attempts to look at doing this using gimp from the command line have been unsuccessful.
An answer can now be found here. Put the following code into a script.
gimp -n -i -b - <<eof (let*="" (="" (file's="" (cadr="" (file-glob="" "*.png"="" 1)))="" (filename="" "")="" (image="" 0)="" (layer="" )="" (while="" (pair?="" file's)="" (set!="" image="" (car="" (gimp-file-load="" run-noninteractive="" file's))))="" layer="" (gimp-image-merge-visible-layers="" clip-to-image)))="" filename="" (string-append="" (substring="" 0="" (-="" (string-length="" file's))="" 4))="" ".xcf"))="" (gimp-file-save="" filename)="" (gimp-image-delete="" image)="" file's="" (cdr="" (gimp-quit="" eof<="" pre="">
enter code hereIt's a script that batch converts to any file format that gimp can read. Just substitute ".xcf" on line 2 and ".png" on line 6 for whatever file formats you need

Resources