Image processing Manupulation problem!!!
Dear all,
God Morning! hope u all are fine .. i have an issue regarding Image processing Manipulation.
i want to give u all the details.. what i have done so far in java.
i have used third party tool of java called ImageJ editor for image manipulation.i got the source of it i have made neccessary customization to store / fetch the image from my table (Database).now this editor is working fine when i click on open option from menu bar it fetches the image from database and after fetching it put the image on container where one can edit/ modify the image and save it back to the table.
the above proceeds me to display or store the edited image on the database . now i just want to integrate the editor on browser ..
how to call the class file when i click on the link on specified page and also how to pass parameter from jsp page to java class file.??
please help me to sort out d problem
"Thanks and regards"
Jonty
Increasing the contrast springs to mind.
When used to extremes it is sometimes called
'cartoonising'
Suppose your image was in 16 colors, you could
reasonably safely assume at least two are red, two
are blue, two are yellow ect.
With regards an algorithm you are looking to 'round
off' the color values to (my suggestion only) the
nearest 64 or even the nearest 127...
Bamkinjust be careful of that ORANGE color. Orange is a tricky color to define in either RGB or HSB, and is very similar to red and yellow. A little change in either direction makes it difficult to distinguish from one or the other.
my thought would be to try to force your image to only six colors. Then those colors (it wouldn't really matter if they were accurate, as long as they are correctly distinguished) would be easy to identify.
- Adam
Similar Messages
-
Image Processing (JAI-API) Instalation problem
I am developing the software in Image processing (remote sensing). I am facing the following problem when i run the program.
C:\java_ex>javac SimpleJAITest.java
SimpleJAITest.java:23: cannot resolve symbol
symbol : class ScrollingImagePanel
location: class SimpleJAITest
ScrollingImagePanel panel1, panel2;
^
SimpleJAITest.java:36: cannot resolve symbol
symbol : class ScrollingImagePanel
location: class SimpleJAITest
panel1 = new ScrollingImagePanel(loadImage, 300, 300);
^
SimpleJAITest.java:78: cannot resolve symbol
symbol : class ScrollingImagePanel
location: class SimpleJAITest
panel2 = new ScrollingImagePanel(outImage, 300, 300);
^
Note: SimpleJAITest.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
3 errors
Please send the information regarding installation of Java Advance Imaging kit
and link to download JAI API
Also send the solution of this problemC:\java_ex>javac SimpleJAITest.java -Xlint:deprecation
SimpleJAITest.java:23: cannot find symbol
symbol : class ScrollingImagePanel
location: class SimpleJAITest
ScrollingImagePanel panel1, panel2;
^
SimpleJAITest.java:29: warning: [deprecation] set(java.lang.Object,java.lang.Str
ing) in javax.media.jai.ParameterBlockJAI has been deprecated
loadPB.set(argv[0], "hs");
^
SimpleJAITest.java:36: cannot find symbol
symbol : class ScrollingImagePanel
location: class SimpleJAITest
panel1 = new ScrollingImagePanel(loadImage, 300, 300);
^
SimpleJAITest.java:39: warning: [deprecation] show() in java.awt.Window has been
deprecated
window1.show();
^
SimpleJAITest.java:78: cannot find symbol
symbol : class ScrollingImagePanel
location: class SimpleJAITest
panel2 = new ScrollingImagePanel(outImage, 300, 300);
^
SimpleJAITest.java:81: warning: [deprecation] show() in java.awt.Window has been
deprecated
window2.show();
^
SimpleJAITest.java:87: warning: [deprecation] set(java.lang.Object,java.lang.Str
ing) in javax.media.jai.ParameterBlockJAI has been deprecated
savePB.set(argv[1], "filename");
^
SimpleJAITest.java:88: warning: [deprecation] set(java.lang.Object,java.lang.Str
ing) in javax.media.jai.ParameterBlockJAI has been deprecated
savePB.set(argv[2], "format");
^
3 errors
5 warnings -
Image processing over wireless
Hi,
One of our subsidaries has a setup where continuous video stream is generated from certain application servers processing real time image processing.
The setup goes this way; 3 PC's which run these image processing & are connected to a 3750G switch.
This switch is uplinked to an access point which then carries all these over wireless to the image processing main server.
About two weeks ago, when they tested this ,all 3 PC's had issues running together when operators viewed/worked upon the images on them.
When either one or two of them is turned off, the rest works fine with no disturbance( intermediate stop & start of images ).
Please help with suggestions on what could be the cause. I suspect bandwidth, but since this doesn't cover any WAN links, i doubt that bandwidth is actually the problem.
Thanks in advance.It depends. QoS will help if your having congestion on the wired side. WMM QoS will help for over the air. I would look at the switch port and see if you see drops on both the map and rap side. You might just be over utilizing the backhaul. Remember that it is half duplex link so that can be an issue also. I had an install with regular AP's and 3gb video uploads within 30 minutes and the only way to achieve that is only allowing 4-5 clients per AP. the testing you have done seems to show that the max you can do over that link is 2. How much other traffic is using the wireless. Maybe try to isolate those traffic on a separate RAP/MAP pair using AP Groups.
Sent from Cisco Technical Support iPhone App -
Image processing from .txt file onto an intensity graph
I am doing a mini project in my class and I was wondering if anyone could help me. It about image processing but I am bit stuck.
Heres the idea:
"An image is really nothing more than a 2D array of data. The value of every element in the array corresponds to the brightness of the image at that point.
In this project you will create a VI which loads a 2D array of data and then displays it on the screen using the Intensity Graph. Three example files (boats.txt, gordon.txt and parrot.txt) are available on the module webpage that you can use. However, you can also use any other black and white image you like, but will need to convert it to a “text image” first. To do this you can use some software called “ImageJ” which is available on the computers and is free to download.
You can vary the brightness of an image by adding the same value to every element in the array.
The contrast of an image is adjusted by multiplying every element in the array by the same value. Using numerical controls and simple array mathematics, you should adjust the brightness and contrast of your displayed image.
Some other ideas that you could try with image manipulation are:
o Invert an image (change black to white and white to black)"
First I am having problems putting my picture onto the graph. It is in the write file but the colours are not correct and the image has rotated 90 degrees. I will upload my VI so far when I get back onto my computer.
Would really appricate the help! Thank you for readingHi charlthedancer,
Here is an example to get you started.
Kind regards,
GajanS
Attachments:
Test.vi 14 KB -
Image processing with BLOBS: how to write BufferedImage to a BLOB
Hi everybody - thanks in advance for any input on that topic.
I'm doing image processing using AWT and 2D. Images are stored in a RDBMS as BLOB Type, which I get using JDBC and convert to a BufferedImage using a JDBCImageDecoder.
Now, I have my BufferedImage and I can process them using the appropriate filters (ConvolveOp e.g.)
Writing the BufferedImages to disk or display on screen is easy. But I can't get to write them to a BLOB Object. Any Hint ?
(Of course, I'm speaking of oracle.sql.BLOB objects, not java.sql.Blob).
Thanks and have a nice dayBilly,
Thank you for your answer. I have two questions.
First what that means "Bob's your uncle ?" I'm a french man, not used to english special sentences ou jargon. Would enjoy to know !
Second, I have created a PL/SQL procedure to update my table. I face a problem.
I want to initialize b_lob with the img_blob value but I get an error : "ORA-22922: nonexistent LOB value". WHere do my error comes from ? I am fairly new in this stuff of BLOB.
Below my procedure.
Thank for your kind help.
Christian.
create or replace
procedure insert_img as
f_lob bfile;
b_lob blob;
loops number default 0 ;
lines number default 0;
stmt varchar2(4000);
cursor c1 is select img_blob, file_name, pk from photos FOR UPDATE ;
begin
NULL;
dbms_output.enable(900000);
stmt := 'SELECT COUNT(*) FROM PHOTOS';
EXECUTE IMMEDIATE stmt INTO LINES ;
for ligne in c1 loop
exit when loops >= lines ;
loops := loops+1;
update photos set img_blob= empty_blob() where CURRENT OF C1;
-- return img_blob into b_lob;
b_lob := ligne.img_blob ;
f_lob := bfilename( 'MY_FILES', ligne.file_name );
IF (DBMS_LOB.FILEEXISTS(f_lob) != 0)
THEN
DBMS_OUTPUT.PUT_LINE('BFILE exist: '|| ligne.file_name || ', ligne :'|| ligne.pk);
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob);
dbms_output.put_line('ligne.pk :' || ligne.pk || ', lines : ' || lines || ', loops ' || loops);
ELSE
DBMS_OUTPUT.PUT_LINE('BFILE does not exist: '|| ligne.file_name || ', ligne :'|| ligne.pk);
END IF;
end loop;
commit;
end insert_img; -
Image Processing Cells Manipulation
Hi Guys,
I am working on cells manipulation. Due to the nature of image processing which scans from a top-down-left to right approach, i am unable to fix a index number on the specific cell which I required this information in order to manipulate the cells as my command. The image processing will be running throughout the programme. As attached is the picture of the Imaq count objects i am using.
On a side note, just want to ask a biology-related experiment if anyone encounter the same issue before, why is a cell easily stuck onto the surface as this action prevents the cells from being trapped once it get stuck on the surface of the cover slip.
Thank you in advance,
Scott
Attachments:
Image Processing.png 227 KBHello,
yes I understand your problem. But it seems to me that the scan direction has no effect on this... What if the scan direction was from bottom-up, left-to right and the cell flows in from the left bottom corner? You would have the same problem...
Or do new cells flow into FOV of the camera only from top-left corner? Could you count the number of objects and linearly increment the indexes of your cells? For example, the first cell that comes into the FOV of the camera has index 0, and when the next cell is introduced, the first cell will have an incremented index that equals 1. And so on...
But if the new cells come into the FOV of the camera randomly from left, right, bottom, top, etc... it would be more difficult. What you could do is calculate some parameters (check particle measurements in NI Vision Concepts) for the cell you want to manipulate (at the time when you are sure this is the correct cell) and then compare these parameters with the cells on every subsequent frame. You can build a feature vector of these parameters and use classification tools. When you classify the cell, then you would have no problems manipulating it.
If your cell changes shape dynamically, then I do not see a way to do this.
Best regards,
K
https://decibel.ni.com/content/blogs/kl3m3n
"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful." -
hi,
I am doing my project in java.My project is " Online Image Processing ".
I did some processing like gray Scale, Invert , Contrast and rotate 90 degree.
can any one help me for
1. I vant to rotate Image to 1 degree...
2. How to get Blure and Sharpen image?
3. Can i append frames inside applet?
plz Help me ..I did not read the content of the links (To lazy) just found them for you.
You say that the examples use frames:
this should not be a problem as the required code is the same.
Tip:
How whould you display a image in a frame?
How whould you display a image in a applet?
Concentrate on the above 2 and simply change the code accordingly.
This should be easy also try asking google. -
Image Processing and machine vision don't appear in Function Palette
Hi,
I have problem and I can't solve it
Image Processing and machine vision don't appear in Function Palette, Although I set up NI imaq and NI Vision Acquisition Why??
Anyone can help me?
Solved!
Go to Solution.If the image is already a Grayscale U8 image you would just have to save it to a bitmap file using the IMAQ WriteFile VI. If not, use the IMAQ Cast Image VI to convert it to a Grayscale U8 and then save it.
Also, it would probably be better to create a new thread for questions like these.
Cameron T
Applications Engineer
National Instruments -
IMAGE PROCESSING THROUGH DLL WRITTEN IN C++
Hello,,,
actually i am writing a program for image processing in c++ and try to make a DLL . My idea is to use labview for acquiring and displaying the images and use c++ for calculation because i think if i use dll the time will be shorter than using labview VI's... i succeed in obtaining results,,, but the processing time became longer than using labview VI's for processing.... This problem occurs from using the image 2d array in the following style:
for (j = 0; j < row; j++)
for (i = 0; i < col; i++)
A[j*col + i] = a[j*col + i];
because of the consideration of memory allocation....
My question is: how can i use the image 2d array as same in c++.... I mean how to write it in this form A[j][ i] using pointer without make confusing labview memory...
thanks,,,thanks Andrey,, i use 2d array because after several image processing steps ,,, such like stretching i will obtain paricle ( see the attached image).... in my opinion is : i can track those edges if i apply some tracking algorithm,,,, like this
if (nb[(j * col) + i]==0)
for (int j= 1; j< row-1; j++ )
for (int i = 1 ; i < col-1; i++ )
ip = (j*col)+i+1;
im = (j*col)+i-1;
jp = (j*col)+i+col;
jm = (j*col)+i-col;
so i can search in side the image for the location of the edges....
so sir if there is some way to write the image like 2d array this will be helpful... usually i have something wrong when write the image like this : image [ j ] [ i ],,,,,,, i am keeping searching for a solution during the last two months,,,
but nothing changed... i have to keep trying and trying...
( sir, iam student and this is not my option,,,, just i have to do it like 2d array )
thanks for alllllll
Attachments:
1.png 2 KB -
Image processing - OutOfMemoryError
Hi,
I have a question about image processing programs. I want to write an image processing program (more as an exercise), so far I have succeeded with a few steps. I am able to create a new document and display it's contents on screen. It's based on the BufferedImage class basically. Now the problem is, when I enter dimensions in a New dialog to be 30000x30000 (that's a limit in Photoshop) I get an OutOfMemoryError such as below. How can I write a program that can be competitive to Adobe Photoshop. Photoshop can handle 30000x30000 pixels (and remember, it can have multiple layers etc.). How to achieve that in Java? Also, Photoshop (in the Preferences pane) allows to set the memory usage, there is a slider and one can just set how much memory Photoshop is about to utilize. Is that possible in Java?
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at pr.g.Picture.<init>(Picture.java:56)
at pr.docs.DocCAN.<init>(DocCAN.java:24)
at canvas01.DocHandler.createNewDoc(DocHandler.java:33)
at canvas01.CanvasGUI.actionPerformed(CanvasGUI.java:309)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at javax.swing.AbstractButton.doClick(AbstractButton.java:337)
at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(BasicMenuItemUI.java:778)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1645)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:670)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:678)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:678)
at javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:649)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:254)
at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2928)
at javax.swing.SwingUtilities.processKeyBindings(SwingUtilities.java:1554)
at javax.swing.UIManager$2.postProcessKeyEvent(UIManager.java:1454)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:722)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676)
at java.awt.Component.dispatchEventImpl(Component.java:4608)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4566)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
at java.awt.EventQueue.access$000(EventQueue.java:86)PR.user5287726 wrote:
Andrew Thompson wrote:
Aardenon wrote:
..How can I write a program that can be competitive to Adobe Photoshop. ..Hire a team of programmers & analysts of the same general size as what Adobe assigns to Photoshop?
.. Photoshop can handle 30000x30000 pixels (and remember, it can have multiple layers etc.). How to achieve that in Java? .. Increase the memory size assigned to the app. at start-up. No, wait.. those figures would suggest the image takes up 900 MPix, and given 4 bytes per pixel (RGBA) would increases that to around 3.6 Gb. Java has a hard limit around 2 Gb, AFAIR.
Use a disk based store?If the OP is running a 64-bit OS, just use a 64-bit JVM. On a machine with a lot of RAM."My super duper Photoshop clone. Minimal system requirements: 64 bits CPU and 4gb of memory".
Although I would laugh to see that happen, I would cry at the same time because people will of course blame such ridiculous practices on the fact that Java is used. -
Payload with images processing
Hello,
My problem may be pretty common but i cannot decide on most suitable approach. So i turned to this forum where i always find an answer.
I have to develop a flow, XML over JMS, to receive a message payload with number of images as base64Binary in specific elements e.g country, city, area
<Payload>
<country>
<element/>
<element/>
<Image>EQ==</Image> <!-- Optional -->
</country>
<City>
<element/>
<element/>
<CityImages><!-- Optional -->
<Image>EQ==</Image>
<Image>EQ==</Image>
</Image>EQ==</Image>
</CityImages>
<Area>
<element/>
<element/>
<Images> <!-- these images are must -->
<Image1>EQ==</AreaImage1>
<Image2>EQ==</AreaImage2>
</Images>
</Area
</Payload>
These images will be stored in a separate system before rest of the payload is forwarded to a different system.
The system where images needs to be stored expose a web service and will return a unique image reference number for each image we store. Created a XQuery which will wrap all images in collection of documents sent to local service. And second XQuery will go through that collection of document and create a request payload for the image processing service. Second XQuery also assign Id to each image as serial number (1, 2, 3...) in the order they are present in the collection when it processes collection of document. The request to image web service goes as one payload with multiple images e.g. <DataSource><Query><id>1</id><image>EQ==</image></Query><Query><id>1</id><image>EQ==</image></Query></DataSource> with unique id and image content.Response contains Id and image reference number e.g. <QueryResult><result><id>1</id><ref>AB1312</ref><></result><result><id>2</id><ref>AB1124</ref><></result></QueryResult>.
Images contents in original payload will then be replaced with the reference numbers returned from the images system.
Now the problems i have is:
1 - First Xquery which creates document collection goes through the payload and when it finds an image it create a document element but i am unable to generate unique ID, in xquery, for each image found in original payload. Second Xquery goes through document collection and uses 'at $count' in for loop as counter and assign that to Id attribute. Ideally unique id sould be generated in the flow or first xquery, instead of second xquery, some how and used as reference?
2 - I intend to correlate returned image reference number based on the sequence(assumption) in which image appear in the original payload instead of using any cross refence mechanism.
I seek guidance on my solution on how best to correlate image reference number with corresponding image in the original payload.
Many Thanks for help!
Sall0You can use the fn-bea:uuid() xquery function to generate unique id's for each image in the first xquery.
For correlating the image ref no to the actual image in the payload , what you are following based on sequence looks ok, since there is no reference available for each image on the original payload, kind of using the image index within the original payload looks fine. -
Bridge CS4 - Image processing into subfolders
Design Premium CS4
Bridge 3.0.0.464
XP Pro SP3
Problem: Image processing into subfolders
I have a folder with several subfolders containing JPG files.
I want to reduce the file size by reducing the quality.
I use the following to do this:
Tools | Photoshop | Image Processor
Bridge doesn't appear to have the smarts to traverse down into the subfolders i.e. one has to do each folder individually.
Is there a way to have Bridge image process down into the subfolders? Thanks in advance.This is a job for Photoshop not Bridge, Bridge can not alter the JPEG settings.
This Photoshop script should do what you want if you are talking about normal JPEGS and not Save for Web.
#target photoshop
var imageFolder = Folder.selectDialog("Select the folder with JPGs to process " + $.getenv("username"));
var quality = prompt("PLease enter quality required 1-12 ",5);
if (imageFolder != null) processFolder(imageFolder);
function processFolder(folder) {
var fileList = folder.getFiles()
for (var i = 0; i < fileList.length; i++) {
var file = fileList[i];
if (file instanceof File && file.name.match(/\.jpg$/i)) {
open(file);
saveFile(quality);
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
} else
if (file instanceof Folder) {
processFolder(file);
function saveFile(quality){
saveOptions = new JPEGSaveOptions();
saveOptions.embedColorProfile = true;
saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
saveOptions.matte = MatteType.NONE;
saveOptions.quality = quality;
var fileRef = new File(decodeURI(activeDocument.fullName.fsName));
activeDocument.saveAs(fileRef,saveOptions); -
Batch Processing Video Problem
Hi
I am using CS4
I have a number of small AVI files I would like to batch process. I need to use 'load video frames as layers' and then I have an action set up that lays each layer out to form a grid of small images.
The problem I have is that when I run the batch process and point it at the folder it loads the videos as a single image (first frame visible) rather than as layers.
If I include the instruction to load video as layers in the action its forces me to select a file and when I run the batch process it acts repeatedly on this file only rather than all the files in the folder.
Any ideas?
Thanks in AdvanceFigured it out myself - discovered the animation panel (doh) and used 'flatten video frames to layers' in the action
-
WinPE background will display on user's desktop after imaging process is complete
This is an issue we've noticed when SCCM 2007 OSD as well, but it appears more frequently now that we've moved all of our imaging processes to SCCM 2012 R2.
Our boot WIM is using the default WinPE backgrounds from Microsoft. After the imaging process completes, the user is able to login with no problem and our company default background will be display. Sometimes (as it's random and not every machine that's
imaged) the background will change back to the last step of the generic Microsoft WinPE screens and remain that way until the machine is rebooted.
I've searched around the web but haven't come across anyone with a similar issue yet (which could be because I'm not searching for the correct terms).
Any thoughts or ideas?
Thanks in advance.Hi,
How did you set background? unattend.xml or replace the default wallpaper
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Need Help for Image Processing
Hi everyone,
my name is Davide and I am a new member. I apologize in advance for my English that It's not very good.
I have to do an exercise where I have to draw a SAR(Synthetic Aperture Radar) Image. The problem is that the input image is composed by a binary raster plus an XML parameters file. The XML file contains all the information to correctly read the image.
I downloaded Java Advancing Imaging Library but I've never worked with this image format and I don't know where to start.
Can anyone help me? How should i do with the binary raster file? How can i read it?
Thank you very much.Hi everyone again,
I followed your advice and I studied the theory on raster data so I have made some step forward. Now I have a new problem that I will try to explain you in the better way. I was able to obtain from the binary raster data an array of float.
From the XML parameters file I know that the rows number are 1000, the columns number are 2000, the pixel type is complex float and that the real and imaginary parts are put side-by-side on a column basis. I created two array, one of the real parts and one of the imaginary parts:
for (int i=0;i < SIZE_X*SIZE_Y; i++){
if(i%2 == 0){
real[k] = bin_input;
if(Math.abs(real[k]) > max_value_re){
max_value_re = Math.abs(real[k]);
k++;
}else{
img[n] = bin_input[i];
if(Math.abs(img[n]) > max_value_im){
max_value_im = Math.abs(img[n]);
n++;
Then I create an array with the absolute value of complex number:for (int i=0;i < SIZE_X/2*SIZE_Y; i++){
mag[i] = (float) (Math.sqrt(Math.pow(real[i]/max_value_re,2) + Math.pow(img[i]/max_value_im,2)));
Now I have an array of float with values from 0 and 1. I tried to create a gray scale image because in the XML file it says that the number of channels is 1:BufferedImage theImage = new BufferedImage(SIZE_X/2, SIZE_Y, BufferedImage.TYPE_4BYTE_ABGR);
WritableRaster wr = (WritableRaster) theImage.getData();
wr.setPixels(0, 0, SIZE_X/2, SIZE_Y, mag);
File outputfile = new File("C:\\Sviluppo\\workspace\\Java\\SAR\\Milano.png");
try {
ImageIO.write(theImage, "png", outputfile);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
The problem is that the image is all black as if the method is not able to interpret the float values and puts everything at zero.
First of all, do you think the process can be right or is there some logical/theorical error? If it's ok, How can I fix the problem?
Thank you.
Maybe you are looking for
-
Hi, Can we convert the spool into excel format and send as attachement via mail.I don't want to send spool as PDF. Regards, Karthik.k
-
What is a finder window in cs6 windows 7 and how can i access it
what is a finder window in cs6 for windows 7 and how can I access it?
-
Password form expired message. Can't change password
Password reset form says contact support. Form has expired. Have tried to reset multiple times. Continue to receive error message
-
Run command without using ./
Hi, Maybe I place this question in a wrong forum. But I guess there is somebody who knows. How to run command under Linus platform without using ./ ? For instance, I run ./crs_stat. How can I run crs_stat ?
-
How to insert row in usercreat table(useing HTML tags)in jtextPane
hi all i creat userdefined table in JTextPane like this tableBody.toString() -- iam passeing table tags htmlKit.insertHTML(htmlDoc, caretPos, tableBody.toString(), 0, 0, HTML.Tag.TABLE); i want to insert a row in table.. i did like this htmlKit.inser