Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I want to rotate a BufferedImage from a math phrase so that become like this :
http://i.stack.imgur.com/ekP77.jpg
convert to :
http://i.stack.imgur.com/tYth1.jpg
we have not images and them include by user.
Minimize axis aligned bounding box area.
Simplest algorithm could do coarse estimation every 10 degrees. Pick best angle and do refinement with smaller angular step.
Probably you should pick wider rather than taller result.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
This post was edited and submitted for review 1 year ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
Want to create a layout for Redeem Items. Kindly suggest or help how can I accomplish this easily?
Check this image for the idea
Dark Version of the item
You can't set a shape for a view. A view is always a rectangle. What you can do is make a view with a custom background with a non-rectangular shape and transparency in the area outside the shape, and use that as the background, which will make it appear as if it has a shape.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there any java third party library which can be used to implement Excel's LINEST function? I want to calculate LINEST value same as LINEST[known_y's;known_x's;cont;stats] function in Excel for an array of 'x' and 'y' values. Please let me know if anyone has an idea in implementing this.
Use ApacheCommons Math Library. There are specific SimpleRegression class.
Maybe help you!
From https://support.office.com/en-us/article/LINEST-function-84d7d0d9-6e50-4101-977a-fa7abf772b6d:
"The LINEST function calculates the statistics for a line by using the 'least squares' method to calculate a straight line that best fits your data" Looks like you just need to find an algorithm for for working out the least squares
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need an algorithm or preferably a library, that will assist with arranging a diagram. I can already draw my diagrams, I just need arranging.
A diagram consists of one or more different sized rectangles, they may be connected. Some rectangles must have fixed positions, and the goal is to minimize total connection length. For example, this diagram where red squares have a fixed existing position, and where green squares should be positioned to minimize total connection length.
An optimal scenario is for me to input a graph, where nodes are rectangles and edges are connections. Nodes would have a certain size and possibly a fixed position. The output will be a set of XY coordinates.
I would like to know either an algorithm or library for such a task, thank you.
I have already looked briefly at JUNG and Graphviz, but I fail to see how they might solve my problem. Also, the final program will be an Eclipse plugin, so I would like to be able to easily bundle any external dependencies.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I search for Java free open source shapes library,
That contains shapes like: Triangle, circle, Square, Polygon and etc'.
Of course it's should be graphics and not textual (terminal \ cmd).
Do you know about good one? Thank you.
Check out two particular ones (if you're still looking) the MyroJAVA program- this one is really designed for robots, but surprisingly has some pretty good Graphics library. http://wiki.roboteducation.org/Myro_in_Java
Also this library from Williams College: http://eventfuljava.cs.williams.edu/library.html
That contains shapes like: Triangle, circle, Square, Polygon and etc'.
With exception to triangle, the Java Graphics API already contains all theses, and to be honest, triangle wouldn't be that hard to implement (it's a closed polygon with 3 points after all)
I'd start by reading through 2D Graphics, in particular Working with Geometry
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there any code(specifically Java or C++) or software in which we import any image and it gives the outline of that image in points, which we can use again to draw image outline by joining those points in JOGL or OPenGL ..
There's an outline tracer in Inkscape (which is open source c++).
http://inkscape.org/doc/tracing/tutorial-tracing.html
This will convert to vector format - so you could get some points out this way.
EDIT: this actually uses http://potrace.sourceforge.net/ for the tracing..
Here is an example code in MATLAB:
%# read image
I = imread('coins.png');
%# Convert to a binary image
BW = im2bw(I, graythresh(I));
%# get object boundaries
BW = imfill(BW,'holes');
B = bwboundaries(BW,'noholes');
%# plot boundaries overlayed on top of image
imshow(I), hold on
for i=1:numel(B)
plot(B{i}(:,2), B{i}(:,1), 'Color','g', 'LineWidth',2)
end
hold off