OpenIMAJ | OpenIMAJ - Copied from the SVN repository svn : //svn | Reverse Engineering library
kandi X-RAY | OpenIMAJ Summary
kandi X-RAY | OpenIMAJ Summary
Copied from the SVN repository svn://svn.code.sf.net/p/openimaj/code/trunk on June 27, 2012.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Process a video
- Reset the reader
- Tracks an object from a video
- Saves the face image to the output directory
- Calculate the affine features
- Performs an affine transformation
- Displays the current patch
- Selects the difference between the image and the scale
- Recursively builds the tree for the specified marker image
- Updates the visualisation of a sample
- Estimates the eight - point matrix
- Returns the eigenvalue of a matrix
- Runs the ComputationMatrix
- Main entry point
- Called when a mouse is clicked
- Set up the graphical widgets
- Deserialization
- Main entry point
- Updates the model
- Writes the HTML file
- Analyze an image
- Main method
- Main method for testing
- Calculate the convex hull
- Initialize the frame
- Converts an image into a pseudo - colour image
OpenIMAJ Key Features
OpenIMAJ Examples and Code Snippets
Community Discussions
Trending Discussions on OpenIMAJ
QUESTION
I have two photos, one zoomed in and the second a large, wide angle photo. Consider the first image a crop of the second(though it is not). I select a single pixel from each photo that represents the same thing in both pictures (say a man's nose). I overlay the first picture, with some transparency, on top of the second picture aligning the two selected pixels?
Now I want to scale the second image until the first image essentially disappears because the scale of the second image matches the scale of the first.
I am using OpenImaj and have successfully accomplished this using MBFImage.overlayInPlace(). The problem I have is that when I use ResizeProcessor to scale the second image, I get an "OutOfMemoryError: Java Heap Space" if I have to scale the second image too much ( >5x ).
I have bumped up the -Xmx to 12G using JDK 12 64bit. I have tried the ResizeProcessor, BilinearInterpolation and BicubicInterpolation resizers all with the same result.
Here is my method with my latest attempt. Depending on how much memory I give the JVM it sometimes fails on the resize, other times is fails on the toRGB():
...ANSWER
Answered 2019-May-02 at 01:30Sometimes a solution is so obvious it is embarrassing.
My real goal, now that I think about it, is to find the scale factor between the two images. Instead of scaling up image2, I can scale down image1. This is much less memory intensive. Then with regards to image2 I can just invert this scale factor.
QUESTION
My purpose is to identify a shape after having trained a classifer, similar to what's done in chapter 12 of The OpenIMAJ Tutorial http://openimaj.org/tutorial/classification101.html . Chapter 12 uses Caltech101 class which is not helpful to me because I want to use my own set of images to train a classifier. I created this working code which is based on Chapter 12:
...ANSWER
Answered 2018-Oct-17 at 20:29If you just want to classify things with the model you've trained then ignore all the ClassificationEvaluator
stuff - its just for computing accuracy, etc.
Take a look at http://openimaj.org/apidocs/org/openimaj/ml/annotation/linear/LiblinearAnnotator.html (the type of your trainer
object). As your trainer
instance is typed on FImage
and String
its annotate()
and classify()
methods will both accept an FImage
that you provide as input and provide the classification result as output (in slightly different forms; you'll have to decide which fits your needs best).
QUESTION
I want to measure the time that KMColourSegmenter, in OpenIMAJ library, takes to perform the clustering.
If I didn't make the initial centroids fixed, rather than random, I can't make the measure the performance; because it will change every time, give different number of iterations , and vary in time to execute the clustering.
So how to make the initial centroids fixed i.e. setting them manually?
Update:
@Jon Thanks for the answer, I am trying to implement what you said. Could you check it, especially the "clusters" array I think this array doesn't make sense to initialize. Please, correct me if I am wrong.
...ANSWER
Answered 2017-Mar-17 at 08:40You'll have to implement this yourself; create a subclass of KMColourSegmenter
and create a constructor that takes in the centroids, as well as any parameters needed by your choice of constructor in the KMColourSegmenter
super class. Then in your constructor, after the call to super
, use the this.kmeans.setInit()
method to set a initialisation to use you predefined centroids. You'll need to implement a custom FloatKMeansInit
subclass that lets you set the centroids externally, but this should be trivial as it only requires implementing a single method.
Update in response to amended question:
You shouldn't call initKMeans
directly; that happens behind the scenes when you run the algorithm. You also need to populate the centroids array with the centroids initial centroids you want rather than from the bds
. For example (untested):
QUESTION
I am using OpenIMAJ library, it is working well on "JPEG" and "PNG" files but on tiff files it is giving me an error. Here is the code:
...ANSWER
Answered 2017-Mar-06 at 11:55TIFF is a horrible format as it has many custom extensions which are not always supported by libraries. OpenIMAJ tries to get around some of these issues by using a batch of different libraries in order to read all sorts of different images, however in this case it's failing. As you've noticed there is a 10mb buffer limit which is causing an issue - increasing it to 100mb allows the image you linked to be loaded. I'll update the code to address this (as it's only a limit, it would seem that the underlying buffer is much smaller so this shouldn't cause any problems).
As a quick work-around until the new snapshot is deployed, you can load the image you linked with this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install OpenIMAJ
You can use OpenIMAJ like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the OpenIMAJ component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page