Archive

Archive for February, 2011

MultiMedia Systems Project Mid term Evalution ppt


Here is the multimedia mid term evaluation project ppt An Efficient Video Similarity Search Algorithm. I had already specified the abstract of the project and the actual IEEE Transaction paper I’m implementing.  The ppt contains up to now what all the work I’ve done and what else is remaining.

Web 2.0 vs. Web 3.0 by Eric Schmidt


Here is the video which depicts the concept of web 2.0. The CEO of Google explains the term Web 2.0.

Read frames from a given video using MATLAB code


Here is the code to read the frames from a given video using MATLAB. It is very easy to read the individual frames from a given video. The code as follows

function [ frame ] = readFrames( vid )

readerobj = mmreader(vid);
vidFrames = read(readerobj);
numFrames = get(readerobj, ‘numberOfFrames’);
for k = 1 : numFrames
mov(k).cdata = vidFrames(:,:,:,k);
mov(k).colormap = [];
%imshow(mov(k).cdata);
imagename=strcat(int2str(k), ‘.jpeg’);
imwrite(mov(k).cdata, strcat(‘vasanth’,imagename));
%extractComponents(mov(k).cdata);

end

mmreader() function supports more number of video format if you go for avireader() it allows only avi files. In the above code mov(k).cdata contains the actual image information. Using imwrite() we are actually writting the image on the harddisk. imagename=strcat(int2str(k), ‘.jpeg’); Here I’m appending the k.jpeg ex: 2.jpeg if you want to have in the other formats you can simply write .bmp or .jpg or .png instead of jpeg in the above code. vidFrames(:,:,:,k); returns the video frames.

WST Assignment #3


This third assignment has given me a lot of experiences the very first impact is that, we have to use the C#and ISS server(to which I’m unfamiliar). By now you would have understood that I might have used SQL server database as back end(Yes).
The second experience is that power of the Visual Basic editor, it has a lot of support for the developer, makes the things much easier.
People most of the times get scared of XSD(XML Schema Definition) successor of the DTD but it is very easy to write. I would like to share the XSD file I wrote for this assignment. It is very simple and easy to understand.

 

<?xml version=”1.0″ encoding=”Windows-1252″?>
<xs:schema attributeFormDefault=”unqualified” elementFormDefault=”qualified” xmlns:xs=”http://www.w3.org/2001/XMLSchema”&gt;
<xs:element name=”Profile”>
<xs:complexType>
<xs:sequence>

<xs:element name=”Name”>
<xs:simpleType>
<xs:restriction base=”xs:string”>
<xs:pattern value=”([a-zA-Z ])+”/>
</xs:restriction>
</xs:simpleType>
</xs:element>

<xs:element name=”RollNo”>
<xs:simpleType>
<xs:restriction base=”xs:string”>
<xs:pattern value=”([a-zA-Z0-9])+”/>
</xs:restriction>
</xs:simpleType>
</xs:element>

<xs:element name=”PhoneNo”>
<xs:simpleType>
<xs:restriction base=”xs:string”>
<xs:length value=”13″/>
<xs:pattern value=”[+]([0-9])*”>
</xs:pattern>
</xs:restriction>
</xs:simpleType>
</xs:element>

<xs:element name=”Email”>
<xs:simpleType>
<xs:restriction base=”xs:string”>
<xs:pattern value=”\w+([\-\+\.’]\w+)*@\w+([\-.]\w+)*\.\w+([\-.]\w+)*”>
</xs:pattern>
</xs:restriction>
</xs:simpleType>
</xs:element>

<xs:element name=”CollegeAddress”>
<xs:complexType>
<xs:sequence>
<xs:element name=”RoomNo” type=”xs:string” />
<xs:element name=”Hostel” type=”xs:string” />
<xs:element name=”College” type=”xs:string” />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name=”PermanentAddress”>
<xs:complexType>
<xs:sequence>
<xs:element name=”H.No” type=”xs:string” />
<xs:element name=”Town” type=”xs:string” />
<xs:element name=”Dist” type=”xs:string” />
<xs:element name=”State” type=”xs:string” />
<xs:element name=”Pin” >
<xs:simpleType>
<xs:restriction base=”xs:string”>
<xs:length value=”6″/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name=”Interests” type=”xs:string” />
<xs:element name=”Hobbies” type=”xs:string” />
<xs:element name=”AboutMe” type=”xs:string” />
<xs:element name=”Image” type=”xs:string” />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

 

 

I’ve used \w+([\-\+\.’]\w+)*@\w+([\-.]\w+)*\.\w+([\-.]\w+)* this for the email pattern. If my email pattern written in .xm. is file is not of this regular expression XSD file shows errors in the validation. For this XML validation I used the validateXML-1.1-bin.jar file. In order to validate the XML file using the validateXML-1.1-bin.jar validator we should use the following tag in the  present XML file
<Profile xsi:noNamespaceSchemaLocation=”profile.xsd” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;

in the above syntax the profile specifies the root element of the XML file. The profile.xsd specifies the .xsd file we want to apply to that.

the validation command to work with it is:

java -jar validateXML-1.1-bin.jar   -in profile.xml