the difference between saving grayscale and RGB image in JPEG format

Say I have a three dimensional array 'A', contain an RGB image.
I 'imwrite' this array 'A' in JPG format, with quality = 100 (maximum), let's say it is saved in the name 'A.jpg'.
Then I 'imread' the picture 'A.jpg' and save it in 'A2' array.
If I 'imsubtract' array 'A' from 'A2', I can see from the result that their pixel's values are far different. Well not that far, but yeah they are different (in a range of 8 till 50 or so).

If I treat a grayscale image that way (from the 'imwrite' till the 'imsubtract' process) the difference won't be that far (just in a range of -1 til 1).

This does not happen in BMP, PNG, or TIF format. So I guess it's because of the JPEG compression effect.
But why the RGB image affected more?
Anybody can explain why?
Thank you very much...

Best regards
0
Yuwono
3/20/2010 3:20:05 PM
comp.soft-sys.matlab 207314 articles. 1 followers. lunamoonmoon (258) is leader. Post Follow

0 Replies
1186 Views

Similar Articles

[PageSpeed] 30
Reply:
Similar Artilces:

RE: (wxMac) Copy image onto Clipboard #3
Hi, Kevin. Would you mind sending me the codes for the part of copying the image onto Clipboard ? Thanks ming -----Original Message----- From: Xu, Ming (NIH/NLM/NCBI) Sent: Wednesday, June 29, 2005 2:41 PM To: wx-users@lists.wxwidgets.org Subject: RE: (wxMac) Copy image onto Clipboard wxMac 2.6.0, have not tried clipboard sample yet on it. ming -----Original Message----- From: Kevin Hock [mailto:hockkn@yahoo.com] Sent: Wednesday, June 29, 2005 2:00 PM To: wx-users@lists.wxwidgets.org Subject: Re: (wxMac) Copy image onto Clipboard Hi Ming, Well, in that ca...

Moving to different hardware
Hi all, I would like to know what are the risks/problems in moving a basic Redhat 8.0 installation (running firewall + Postfix) onto a different hardware, that is a new motherboard and a new network card. In other words, I need to move the hard disk onto a new different system and I would like to know the problems I can have when booting up. Thanks in advance. Markus wrote: > I would like to know what are the risks/problems in moving a basic > Redhat 8.0 installation (running firewall + Postfix) onto a different > hardware, that is a new motherboard and a new network ca...

Proof different from actual printed piece
I have a printed insert that is different from the PDF proof provided to us. I need to find out what caused the output to change. #Scans of ad http://216.27.31.164/temp/ad_error_front.jpg http://216.27.31.164/temp/ad_error_back.jpg #Proof from printer http://216.27.31.164/temp/carlyle_ad_b.pdf I know we could have avoided the problem by cropping the picture and/or resizing the picture box, but ultimately I (think) it should have printed without problems like PDF proof. The area circled in red is what I am referring to. Notice the woman to the right (4C-CMYK), her shoulder and some of the b...

Re: What is difference in the two input statement ??? #8 663846
....by the way, another thing like that: divide by zero errors. If you have something like a=x/y with no influence to the input data, you should always check y if y not in (0 .) then do; a=x/y; end; else do; a=.; /* or whatever */ end; ...

Different compilers = Different byte code?
Hello, I'm having a very strange problem with a java applet. I couldn't get any java applet to run in internet explorer (standard 1.1 vm <- very old). So i went to: http://java.sun.com/docs/books/tutorial/java/concepts/ClickMeApplets.html These applets are running fine. Now i have downloaded the source code of the example applets, compiled them and put them on my website. And it doesn't run. I've used exactly the same source code. The only difference is the compiler. I guess the examples on the above link are compiled with jdk1.1 and i compile the examples with 1.4. Is...

Binary Diff via Linear Difference
Hello All, I have implemented a Binary Differencing Algorithm called Linear Difference (Modified form of Greedy Algorithm) in a C# Application. which uses byte by byte comparison. Reference: http://hssl.cs.jhu.edu/~randal=AD/burns_ipccc97.pdf The Problem im having is that the algorithm works f9 for Text Files and BMPs but its not working for Application Specific Binaries like, Microsoft Word, Excell, .Net EXEs etc. When i reconstruct the document with the delta file and the older version, It creates a corrupted version of the new file. Any help in this regard will be most appreciated....

fread problem in different Matlab version
Dear all, I had a data file with a file head of 4096 characters. I try to use fread to read the file head, however, the results are different in different Matlab version: [FileAsChars, NumChars] = fread(fid,4096,'char'); I used Matlab 7.1.0.246 (R14). service pack 3 and 7.3.0.267 (2006b), it seems the result is not right at 2006b. Anyone can give me some advices? thank you very much! "bin " <binpersonal@gmail.com> writes: > Dear all, > > I had a data file with a file head of 4096 characters. I try > to use fread to read the file h...

Image Capture
Following suggestions made here, on my work Mac I was able to set the launch app for when I plug in a camera. However, when I try this at home (Mini 1.42, 10.4.6), that is I choose Preferences... from Image Capture, no prefs pane is displayed. Anyone know how to fix this? Thanks, -- tim On Tue, 2 May 2006 3:10:29 -0700, Tim Streater wrote (in message <tim.streater-501E9A.11102902052006@individual.net>): > Following suggestions made here, on my work Mac I was able to set the > launch app for when I plug in a camera. However, when I try this at home > (Mini 1.42, 10.4.6),...

Formatting integers in strings
I seem to be having a brain infarction and cannot see past this simple problem. I would like to be able to format a series of integers so that they are padded to the left with zeros as in: {000,030,060,090,120,150,180} Of course, I can write my own function to do this, but I want to use Mathematica's native formatting functionality. Here is my first try: NumberForm[Range[0,180,30],3,NumberPadding->{"0",""}] yielding: {0000,0030,0060,0090,0120,0150,0180} Making the obvious change: NumberForm[Range[0,180,30],2,NumberPadding->{"0","...

differences
1. In ESE v8.1, is a data joiner necessary or just the replication center is sufficient? 2. Did EEE v7.1/7.2 have replication center, or a data joiner necessary for replication? 3. What is Data Propogator? How is it different from data joiner? Is Data Propagator available for ESE? "Kums" <hikums@gmail.com> ???? news:ca6c59c2.0411301205.7f50f98a@posting.google.com... > 1. In ESE v8.1, is a data joiner necessary or just the replication > center is sufficient? > 2. Did EEE v7.1/7.2 have replication center, or a data joiner > necessary for replication? &g...

for power systems , what difference does it make to use my source as a synchronous generator or as a three phase voltage supply?
hi all i want to model a power system transmission line with fault and as i have seen in the example , the source is modeled as a generator . can i use a three phase voltage supply for my model? what difference do you think it will make? "nil " <nilan29@yahoo.co.uk> wrote in message <hg3let$htq$1@fred.mathworks.com>... > hi all > i want to model a power system transmission line with fault and as i have seen in the example , the source is modeled as a generator . can i use a three phase voltage supply for my model? what difference do you think it will make? H...

Trouble with over/under segmentation of image
I am working with a number of thin sections to see if we can use matlab to aquire the area of grains in the image. Unfortunately I'm having trouble getting the right amount of detail. When I use edge functions such as sobel or canny I get detail of all the little "blemishes" on the grains instead of the grain edge. When I try to reconstruct those blemishes out I completely lose the grain edge. Does anyone have any suggestions on how to handle this? Here is an image similar to what I am working with: http://www.dkimages.com/discover/home/science/earth-sciences/geology/rocks/sedi...

Fortran-like number formatting
In the olden days Fortran had something called G format. It would display a number in minimum space, e.g. 7.6 but would revert to scientfic notation when it had to. I am looking for something for displaying distances with some perhaps rough control of significant digits displayed. I'm thinking in term of things like picture sizes, furniture sizes, distances to drive, paper sizes where I convert back and forth between English and metric measure. Is there anything built-in I have overlooked? -- Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com Roedy Green <...

were to store email-addresses, if different types of mail-clients are used?
Hi: I am contemplating about switching to an open source based email-server like Cyrus-IMAP and do have the following question: "Were" should email-addresses preferably be stored in an environment were webmailers und fully featured email-clients like, e.g. Thunderbird will be used? .. Any tips are appreciated very much. Thank you! Bill This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. --=_mimegpg-commodore.email-scan.com-7437-1104882954-0017 Content-Type: text/plain; format=flowed; cha...

The difference bewteen RTL and behavioral level
I'm very confused about the difference bewteen RTL and behavioral level. Can anyone give me a Verilog Example to help me to distinguish which is RTL and which is behavioral level. Thanks a bunch! I'll attempt to answer your question in a simple way, but I think the main message from the other contributors is that it really doesn't matter - just get whatever you need to get done as fast as possible with the highest quality. If you understand that, then you understand verilog. In answering your question, keep in mind that this is only my opinion. People in indust...

Compare values in different rows in different variables
Hi, I am trying to compare values in different observations in different variables. Whenever there is value on Price A,I would like to compare the value on Price A to the last values that shows before "." on Price B and Price C. For example, compare obs 4 on Price A to obs3 Price B and obs3 Price C. compare obs10 value on Price A to obs9 Price B and obs9 Price C compare obs11 value on Price A to obs9 Price B and obs9 Price C Since they are not in same line, I am having hard time comparing. I used lag function to line up on those v...

How to get frames from imag toolbox
Hello, I got imaq toolbox, I need to get frames from it. How can I get the frames from it? On Feb 26, 8:11=A0pm, "Ongun Palaoglu" <on...@mac.com> wrote: > Hello, I got imaq toolbox, I need to get frames from it. How can I get th= e frames from it? Well I'd guess that if you run through the demos/examples, you'd learn how. Did you do that? I am trying to understand the examples last two hours. I need to put frames to memory, so that I can take the frames. Now, I am trying to do that. But, i am unable to do that part. I am reading the help which are, " logging...

running different plugins within a java application in different JVMs
Hello everyone, I am developing an application that supports loading plugins. It is using the JPF framwork. The problem that I am having is that I want to start each of the plugins within the application in different java versions (start a JVM within another JVM). Currently, the plugins are running as parts of my main application and not as different applications...this is what JPF supports. Can anyone please help me with this? It is really important that I manage to do this. Thanks alot, Alina ...

HP nx7400 with disabled SATA native support? big difference?
Hi, I just subscribed and this is my first post. (If you dont want to read my attempts, plz read the last 2 lines ) I've been having a lot of trouble with my new HP nx7400 notebook. It came bundled with a Windows XP Home (it was cheaper that way). So I decided to get rid of it and replace it with Professional. The first obstacle was during the preliminary windows setup. I had to load additional drivers for the SATA HDD ( Press F6) but my notebook came without a flpy drive (wich was the only way to load the drivers). I tried everything but then decided to buy an external floppy drive (Mayb...

writing to different files
I have a huge input file that needs to be broken up into several different files in order to over-come a size limitation in another process. Can somebody provide me an example of how to do this in AWK. For example: My file does not have any new lines in it so I can use split. So each line must be 1200 bytes long than I write it out to a file. Once I write 25,000 lines to the first file I want to start writing to a second file, third file .... until my input is exhasuted. Thanks in advance for all who answer On Wednesday 10 June 2009 15:33, Stu wrote: > I have a huge input file that need...

Opening different files within the same loop
Hi folks, I am currently trying to automate a testing procedure using LabVIEW that requires the user to select the test from a drop down menu (Ring) and then clicks a button to start the test. When the button is pressed an 'open file' window appears asking for a name to save the file as. This all works fine the first time it is run, but i need to be able to stop the current test, select a new one, and then choose a different filename to save it as, without having to restart the program. I am currently using a timed loop (as the test is time specific) and case statements for each indi...

Re: [DCL REQUEST] New ignore keyword for DIFFERENCES command
In other words, for the general case, any line with $ followed by 0-to-n spaces followed by the comment-delimiter (normally !) would be treated as if blank. "Doc." <doc.cypher@openvms-rocks.com> wrote on 09/23/2004 09:48:48 AM: > %NEWS-I-NEWMSG, Charlie Hammond wrote in news:r5A4d.11515$hV6.8250 > @news.cpqcorp.net > > > > > Although I've DIF'd a lot of DCL procedures, I am having trouble > > understanding the problem here. Did I miss and example? > > If so, perhaps you would re-post it. > > > > I have found that /IGNO...

Re: COMPRESS function working differently in Data Step and Macro #3
I moved the closing parenthesis for the %BQUOTE function, and the HTML files are now named properly! body="nh_%sysfunc(compress(%bquote(%sysfunc(putc(%scan(&cvals,&ci),$cnty.))) ,' ','p')).html" But I am back to the WARNING message in the log (WARNING: In a call to the COMPRESS function or routine, the modifier "'" not valid.). If anyone has info on this, please let me know. To respond to Arlid's suggestion about changing the formatted values, the formatted values are used in other places. Specifically in titles of output reports, wher...

Format natural date
Is there a way to format a natural date like May 7, 2008 to 07/05/2008. Ive tried Date.strptime("May 7, 2008", '%d/%m/%Y') without success? Is it possible to this in a one line with ruby? JB -- Posted via http://www.ruby-forum.com/. On 10.05.2008 13:03, John Butler wrote: > Is there a way to format a natural date like May 7, 2008 to 07/05/2008. > Ive tried > Date.strptime("May 7, 2008", '%d/%m/%Y') without success? You seem to want to _reformat_ a date string. But the code you show just _parses_ a string into a Date. If you want to reformat...

NVRAM module in PC104 format ?
I want 128bytes (small enough!) of NVRAM in a PC104 format. Google has not done it so far! Thanks for any leads. - RM Ramtron has the FM24C256 32kx8 FRAM I2C chip which is a NVRAM TI (Texas Instruments) has the bq4010/bq4010Y series of NVRAM chips. This one is a 8kx8 chip but they go all the way up to a 1meg chip too. try a "nvram" search on their website, they havea bunch of different kinds to check out. I have no idea what you mean by a PC104 format. That is a large PCB. These would plug into a 24 to 32 pin socket on the PCB itself. "Rick Merrill" <RickMerrill@c...