From 2ebdd39dfcea31d852412f9be448ed06e975c567 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Fri, 3 Jan 2014 15:12:42 -0500 Subject: [PATCH] Started working on a rough Image class to handle storing and comparing images, along with hashing. --- .gitignore | 4 +++ name.info | 1 - .../com/sothr/imagetools/image/ImageType.java | 5 ++++ .../sothr/imagetools/dto/ImageHashDTO.scala | 5 ++++ .../com/sothr/imagetools/image/Image.scala | 26 +++++++++++++++++++ version.info | 1 - 6 files changed, 40 insertions(+), 2 deletions(-) delete mode 100644 name.info create mode 100644 src/main/java/com/sothr/imagetools/image/ImageType.java create mode 100644 src/main/scala/com/sothr/imagetools/dto/ImageHashDTO.scala create mode 100644 src/main/scala/com/sothr/imagetools/image/Image.scala delete mode 100644 version.info diff --git a/.gitignore b/.gitignore index df60504..88f8353 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ # Maven Target Files target/ + +# Build Name and Version Files +name.info +version.info diff --git a/name.info b/name.info deleted file mode 100644 index a5eac4c..0000000 --- a/name.info +++ /dev/null @@ -1 +0,0 @@ -Image-Tools diff --git a/src/main/java/com/sothr/imagetools/image/ImageType.java b/src/main/java/com/sothr/imagetools/image/ImageType.java new file mode 100644 index 0000000..70665c1 --- /dev/null +++ b/src/main/java/com/sothr/imagetools/image/ImageType.java @@ -0,0 +1,5 @@ +package com.sothr.imagetools.image; + +public enum ImageType { + SingleFrameImage, MultiFrameImage +} diff --git a/src/main/scala/com/sothr/imagetools/dto/ImageHashDTO.scala b/src/main/scala/com/sothr/imagetools/dto/ImageHashDTO.scala new file mode 100644 index 0000000..f16660d --- /dev/null +++ b/src/main/scala/com/sothr/imagetools/dto/ImageHashDTO.scala @@ -0,0 +1,5 @@ +package com.sothr.imagetools.dto + +class ImageHashDTO { + +} diff --git a/src/main/scala/com/sothr/imagetools/image/Image.scala b/src/main/scala/com/sothr/imagetools/image/Image.scala new file mode 100644 index 0000000..004f59a --- /dev/null +++ b/src/main/scala/com/sothr/imagetools/image/Image.scala @@ -0,0 +1,26 @@ +package com.sothr.imagetools.image + +import scala.collection.Traversable +import com.sothr.imagetools.dto.ImageHashDTO + +abstract class Image(val imagePath:String, val thumbnailPath:String) { + + protected val imageType:ImageType = ImageType.SingleFrameImage + + def getHashes():ImageHashDTO + + def isSimilarTo(otherImage:Image):Boolean + + def getSimilarity(otherImage:Image) + + def getSimilar(otherImages:Traversable[Image]):Traversable[Image] + + def getPath():String = { + return this.imagePath + } + + def getThumbnailPath():String = { + return this.thumbnailPath + } + +} diff --git a/version.info b/version.info deleted file mode 100644 index 20d85a3..0000000 --- a/version.info +++ /dev/null @@ -1 +0,0 @@ -0.1.0-DEV-1-13386ab