Friday, January 9, 2009

Intel and Adobe Collaboration

Adobe and Intel are working together to port and optimise Adobe's Flash technology to the Intel Media Processor CE 3100. The aim is to bring Flash content to devices such as set-top boxes, digital TVs and connected audio-visual devices.

The two companies claim to be uniquely positioned to support consistent internet content across both traditional PC systems and TV platforms. The move is intended to provide better video and web content across the full breadth of consumer devices.

Adobe's Flash Player and Flash Lite will be optimised for the CE 3100, and Intel expects to ship the first CE 3100 with Flash Lite before mid-2009.

"Our effort with Adobe will provide consumers with access to a growing number of Flash-based applications that will ultimately be enjoyed across a number of screens seamlessly, from the laptop to a mobile internet device and now the TV, " said William Leszinske, general manager of Intel's Digital Home Group.

Announced in August 2008, Intel's CE 3100 is a system-on-a-chip combining an 800MHz Pentium M core with graphics functions and video decoder circuitry.

The chip enables developers to target growth areas such as consumer electronics using the familiar Intel architecture.

Daniel Robinson

Wednesday, January 7, 2009

Download Adobe Air for Linux

Adobe Air Linux edition is released. You can download it from here. Some ideas about it ;

As of today there have only been releases of Adobe AIR for Windows and Mac but Adobe is committed to also delivering a version for Linux. This is great news for developers like me who use Linux as their primary desktop operating system.

Adobe CTO Kevin Lynch said in a statement: “This could enable a whole new frontier of applications for Linux. We’re actually looking for Linux users to help us test it.” He said that the Linux version of AIR is currently in an alpha format.

AdobeAIR Alpha on Ubuntu 64 Bit installation can be found here.

I'm very excited with this news. Thanks to Adobe... :)

"Linux lovers do not see below .net codes. I'm also a mac and linux lover but nowadays using .net in a project :("

Image Processing II : Two Ways for Grayscale

There may be many ways to process grayscale but I want to give two examples for it. One of them is very easy like taking average of colors. And the other one is better but uses color matrix. You must define a color matrix to use as image attribute. I like the second algorithm. Anyway, Let's see codes...

'--------------------Code--------------------
Public Shared Function GrayscaleAverage(ByVal img As Image) As Image
Dim rslt As System.Drawing.Image
Dim btmpImg, btmpRslt As New Bitmap(img.Width, img.Height)
btmpImg = DirectCast(img, Bitmap)
btmpRslt = DirectCast(img, Bitmap)
Dim rC, gC, bC, lum As Integer
For i As Integer = 0 To btmpImg.Width - 1
For j As Integer = 0 To btmpImg.Height - 1
rC = btmpImg.GetPixel(i, j).R
gC = btmpImg.GetPixel(i, j).G
bC = btmpImg.GetPixel(i, j).B
lum = Math.Round(0.3 * rC + 0.59 * gC + 0.11 * bC)
btmpRslt.SetPixel(i, j, Color.FromArgb(lum, lum, lum))
Next
Next
rslt = DirectCast(btmpRslt, Image)
Return rslt
End Function
'--------------------Code--------------------


Second function realized with color matrix. You can use another color matrix. may b

'--------------------Code--------------------
Public Shared Function GrayscaleMatrix(ByVal img As Image) As Image
Dim rslt As System.Drawing.Image
Dim btmpImg As New Bitmap(img.Width, img.Height)
btmpImg = DirectCast(img, Bitmap)
Dim g As Graphics = Graphics.FromImage(btmpImg)
Dim cm As ColorMatrix = New ColorMatrix(New Single()() _
{New Single() {0.5, 0.5, 0.5, 0, 0}, _
New Single() {0.5, 0.5, 0.5, 0, 0}, _
New Single() {0.5, 0.5, 0.5, 0, 0}, _
New Single() {0, 0, 0, 1, 0}, _
New Single() {0, 0, 0, 0, 1}})
'You can use other color matrix

Dim ia As ImageAttributes = New ImageAttributes()
ia.SetColorMatrix(cm)
g.DrawImage(img, New Rectangle(0, 0, img.Width, img.Height), 0, 0, img.Width, img.Height, GraphicsUnit.Pixel, ia)
g.Dispose()
rslt = DirectCast(btmpImg, Image)
Return rslt
End Function
'--------------------Code--------------------



Also we can see the difference between two algorithms here.

image taken from here

The other color matrix is here.

'--------------------Code--------------------
'Gilles Khouzams
Dim cm As ColorMatrix = New ColorMatrix(New Single()() _
{New Single() {0.3, 0.3, 0.3, 0, 0}, _
New Single() {0.59, 0.59, 0.59, 0, 0}, _
New Single() {0.11, 0.11, 0.11, 0, 0}, _
New Single() {0, 0, 0, 1, 0}, _
New Single() {0, 0, 0, 0, 1}})
'--------------------Code--------------------


I will continue with edge finding and background extraction. Like Photoshop, isn't it?

Friday, January 2, 2009

Image Processing I : Invert Colors

Hi all,

I'm starting with a basic image processing algorithm. After a while, the whole solution and sample files will be published. I'm also developing this library and sharing with you. Anyway, you can see the algorithm below. All basic colors are converted by subtracting from 255 and founded new Red, Green and Blue color codes. All converted pixel is set to a new image instance. See you at harder image processing algorithms later. Let's See;


'--------------------Code
--------------------
Public Shared Function InvertColors(ByVal img As Image) As Image
Dim rslt As System.Drawing.Image
Dim btmpImg, btmpRslt As New Bitmap(img.Width, img.Height)
btmpImg = DirectCast(img, Bitmap)
Dim rC, gC, bC As Integer
For i As Integer = 0 To btmpImg.Width - 1
For j As Integer = 0 To btmpImg.Height - 1
rC = 255 - btmpImg.GetPixel(i, j).R
gC = 255 - btmpImg.GetPixel(i, j).G
bC = 255 - btmpImg.GetPixel(i, j).B
btmpRslt.SetPixel(i, j, Color.FromArgb(rC, gC, bC))
Next
Next
rslt = DirectCast(btmpRslt, Image)
Return rslt
End Function

'--------------------Code--------------------