我自己的答案只是進行測試和篩選,我希望能看到有專業人士可以講一下 PS 識別紙幣的演算法相關內容(看到 twitter 上 馮東 給 Rio 坦言自己也不知道原理),也許演算法涉及保密,那麼只能是通過實驗來猜測了。
補充 Adobe 官方說明:
Adobe? Photoshop? software includes a counterfeit deterrence system (CDS) that prevents the use of the product to illegally duplicate banknotes. As implemented, CDS prevents users from opening detailed images of banknotes within Photoshop. The CDS technology was commissioned by the Central Bank Counterfeit Deterrence Group (CBCDG), a consortium of central banks from around the world. Adobe has included CDS in Photoshop at the request of the CBCDG.
Laws regarding the reproduction of currency images vary widely from country to country. In some countries, reproduction is permitted for specific purposes given certain restrictions, but in other countries any form of reproduction is considered a crime. For complete information about the rules in a given country, please consult CBCDG』s Web site, http://www.rulesforuse.org. Where applicable, this Web site will also indicate where you can obtain legally reproducible currency images, and who to contact for further questions and information.
In the event that you are unable to get your currency-related question answered through the http://rulesforuse.org Web site, please send an e-mail to [email protected]. Adobe will see to it that your request is forwarded to the appropriate person at the CBCDG.
補充 Wired 2004 年的文章 Currency Detector Easy to Defeat 里的重要部分:
Adobe was just one of a number of companies that had incorporated the same anti-counterfeiting software into their products. Users of Jasc Software"s Paint Shop Pro 8 have reported that it, too, blocks images of currency, but Jasc representatives did not return calls for comment.
The inner workings of the counterfeit deterrence system are so secret that not even Adobe is privy to them. The Central Bank Counterfeit Deterrence Group provides the software as a black box without revealing its precise inner workings.
也能有如上提示,很是奇怪 Photoshop 到底是用什麼來驗證的。 另外他給的 Software Detection of Currency :: Projects :: Steven J. Murdoch 這個鏈接確實非常好的就否定了某些人的觀點。
拓展閱讀(我也正在看): Steganography Photoshop and Currency EURion constellation TIL that Photoshop doesn"t let you edit photos of currency. I got paid today and decided to photoshop my hundreds, and this is the warning that I got. : todayilearned http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/AV0506/s0128541.pdf
關於Adobe軟體用的什麼演算法,這個鏈接:Software Detection of Currency :: Projects :: Steven J. Murdoch,說的很詳細。並且這些驗證機制也只在較新版本(沒條件驗證具體是哪個版本)的PS上才有,並且可能與圖像的清晰度有關。
鑒於很多同學訪問這個網站比較慢,我把網站的一部分內容扒下了給你們看:
UK Pounds
This image, from the 10 Pound note contains all the Eurion instances that are
known of, but is not detected as currency: (包含歐姆龍環的圖像,不被認為是貨幣)
However this image, which has one extra column of pixels at the right is
detected as currency: (比前一個圖多了一列像素,被識別為貨幣)
Even if the constellations are blanked out: (即使是歐姆龍環被屏蔽了)
所以顯然啊,模式匹配的東西不是歐姆龍環。
US Dollars
Similar results can also be seen with the new US $20, in which the "0"s of
the yellow
"20"s scattered in the background form Eurion constellations.
Both PSP and Photoshop identify this image (from an Adobe Forum discussion)
as being currency and refuse to open it, despite there being no instance of the
Eurion constellation:
Another interesting property of this image is that it seems to be a near
minimal test case, since if any changes are made, then it is no longer detected
as currency. Even cropping away the black border will result in it opening in
PSP and Photoshop CS without any warning:
It is belived that some printers use histograms to detect currency. If this
is the feature used by PSP/Photoshop then removing the black border could
sufficiently change the histogram to circumvent the detection system. However,
this image, which is a tiled version of the first image, is not detected as
currency, despite having the same histogram:
大概意思:第一個圖被識別為貨幣,第二個不是,第三個也不是。
Detection Code
The detection code of both PSP and Photoshop CS appears to be the same, due
to them having the same edge cases. A static dissasembly reveals the string
"DMRC" in symbols, the stock sticker code for Digimarc, a company specialising in
watermarking. Subsequent news articles have confirmed that Digimarc developed
the currency-detection code, on behalf of the Central Bank Counterfeit
Deterrence Group (CBCDG), part of the G11 organisation). According to Adobe and
Jasc, adding the detection code is "optional" and that they do not get access to
the source code or details of the algorithm.
It seems that the algorithm is optimised to err on the side of false
negatives, and I have not been able to generate a false positive. It has been
reported that generating a false negative is easy, perhaps as simple as using
images of two notes, side-by-side, rather than just one. A statement from Adobe
said that the version included in Photoshop CS was not the first one proposed by
the CBCDG, and previous revisions were rejected on the basis of having an
unnaceptable false positive rate. Also, while dissasembly is difficult, it is
likely to be comparatively easy to patch around the call to the detection code
and bypass the detector.
Another observation is that unmodified banknotes images cause the error
message to be displayed after a short time, also non-banknote images open
quickly. However the edge cases made from modified banknote images take a few
extra seconds before either opening or displaying the error message.
This would suggest that there is a series of tests, each of which provides a
score on how much the image looks like a banknote, with the later ones which
take longer to execute and presumably being more accurate. At each stage there
could be is a upper and lower limit on the cumulative score, if the upper bound
is reached the image is not opened and an error message displayed, if the lower
bound is reached then the image is opened and no further tests are performed,
otherwise the next test is executed.
The image below shows the smallest square starting at each point on an
English £20 note, which is still detected as currency. The starting points are
generated at 500 pixel intervals and the size of each crop is calculated to a
precision of 5 pixels. Starting points are marked by a green dot, end points by
a red dot; the colour of the square is of no significance. Only the crops
smaller than 700x700 have been drawn. The resulting image has been converted
from PPM to PNG and scaled down from 3524x1906 to 800x433 for presentation.