Thursday, February 20, 2020
Sunday, April 21, 2019
Road Pit hole detection using OpenCV - Part 1
Introduction
This article is about detecting pit holes on road.It analyses images identifies craks & distresses on roadBackground
My friend is a highway engineer. Worked in Chennai,India.He did lot of manual work on identifing pit holes.Survey is done manually employing engineers Measure distresses based on length, depth and areaJava code sniplet
FeatureDetector blobDetector = FeatureDetector.
create(FeatureDetector.ORB);
blobDetector.detect(srcImgMat, matOfKeyPoints);
System.out.println("Detected " +
matOfKeyPoints.size() + " blobs in the image");After that i have identified the keypoints, i have plotted them in the original image We take a video of the road, we will apply same logic to all the frame. This will be done using VideoCapture api of opencv. Then we calculate the SQFT of the distress/crack. Then we calculate the cost of filling the distress. This would reduce rework of laying road and it will last longer. We can make use of tensorflow to identify the cracks. I will post an article in part 2 article.
Hope you liked it
Monday, November 08, 2010
Webgl - SceneJS
1) Goto this URL http://sketchup.google.com/3dwarehouse/details?mid=6577336fbb374e1ee94eb85263ec76bc&prevstart=0
2) Download model google sketchup
3) Open model in google sketchup
4) File --> Export --> 3D Model
5) A file with extension kmz will be saved
6) Extract the file with 7 zip
7) Navigate to the model folder
8) A file with extension .dae will appear
9) Open the file in any text editor(Notepad,Notepad++)
10) In explorer navigate to C:\Users\Raja Sekhar\Downloads\xeolabs-scenejs-utils-ff97cdf\xeolabs-scenejs-utils-ff97cdf\tools\collada-translator
11) Copy the dae file txt and click on translate save it with .js
12) Include the file in html
Saturday, October 09, 2010
Thursday, September 02, 2010
The stored procedure expects a parameter error
Ex getEmployes
assgin parameters to command
execute the command.
you may get an error saying no parameters found for the stored procedure
To resolve this error
you need to assign stored procedure as getEmployees ?,?,? (No of parameters that stored procedure takes)
Saturday, May 29, 2010
Installing sharepoint 2010 in Amazon cloud
Wednesday, September 23, 2009
Executable UML
and is the evolution of the Shlaer-Mellor method[3] to UML
The executable UML consists of
Domain Chart
Class Diagram
Statechart diagram
Action language
Model testing and execution
Model compliation
Using executable UML we can model Platform independent systems. We can verify the system wheather it achieves the specified goals or not.
Wednesday, November 05, 2008
XMLHTTPRequest Object accessing web service
I just browing thorugh the xmlhttpobject and trying to call web service.I am posting the code the here. It calls the holiday web service GetHolidaysAvailable method which calls the method Synchronously.
The following is code
function GetSynchronousJSONResponse() {
var xmlhttp = null;
if (window.XMLHttpRequest)
xmlhttp = new XMLHttpRequest();
else if (window.ActiveXObject) {
if (new ActiveXObject("Microsoft.XMLHTTP"))
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
else
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
// to be ensure non-cached version of response
//url = url + "?rnd=" + Math.random();
url="http://www.holidaywebservice.com/Holidays/US/USHolidayService.asmx/GetHolidaysAvailable";
// xmlhttp.setRequestHeader("SOAPAction", "http://www.holidaywebservice.com/Holidays/US/USHolidayService.asmx/GetHolidaysAvailable");
xmlhttp.open("POST", url, false);//false means synchronous
//xmlhttp.setRequestHeader("Content-Type", "application/json; charset=utf-8");
xmlhttp.send();
//xmlhttp.send("action="+"null");
var responseText = xmlhttp.responseText;
alert(responseText);
return responseText;
}This is one of learnings with XMLHTTPRequest object. Hope you find it useful
Saturday, September 06, 2008
Dell studio 1535 and Yahoo messager problem
Friday, December 28, 2007
Current configuration contains errors that are not corrected by the requested operation Error
When running IBM rational product or Websphere inupdates you may get the following error
Current configuration contains errors that are not corrected by the requested operation and more errors would be introduced
You can solve this problem by using procedure
I came across this error i solved this way
Go to the directory where your product is installed
updater\eclipse\rpu.exe -init -nosplash
type: updater\eclipse\rpu.exe # then proceed as usual.
This is given in IBM site
rpu is rational product updater
Friday, November 09, 2007
Documentum 6 new features
I have been working on documentum for quite a long time. I have worked on documentum 5.3. Which used web services. Now Documentum 6.0 has support for SOA.
The following are features.
retrieving, updating, and deleting repository objects. Copy and move operations are also available.
Version Control Service: provides operations such as checkin and checkout that concern object versions.
Query Service: provides operations for obtaining data from repositories using ad-hoc queries.
Schema Service: provides operations for examining repository metadata (data dictionary).
Search Service: provides operations concerning full-text and property-based repository searches.
Workflow Service: provides operations that obtain data about workflow process templates and an operation for starting a workflow process instance.
This article is by pawan kumar which came in CMS Wire.
It can found at http://www.cmswire.com/cms/enterprise-cms/documentum-6-d6-and-your-services-oriented-architecture-soa-001846.php
Monday, August 20, 2007
Abstract Factory Applicable Scenarios and
The system needs to be independent of how its objects are created,composed, and represented.The system needs to be configured with one of a multiple family of objectsThe family of related objects is intended to be used together and thisconstraint needs to be enforced.You want to provide a library of objects that does not show implementationsand only reveals interfaces
J2EE Technology Features and J2SE API Association
Data Access Object (Sun)Value Object Assembler (Sun)Builder Applicable senarios
The algorithm for creating a complex object needs to be independent of thecomponents that compose the object and how they are assembled. The construction process is to allow different representations of theconstructed object.
javax.ejb.EJBHome javax.ejb.EJBLocalHome javax.jms.QueueConnectionFactory javax.jms.TopicConnectionFactory
CompositeThe following scenarios are most appropriate for theComposite pattern:¦ You want to represent a full or partial hierarchy of objects.¦ You want clients to be able to ignore the differences between the varyingobjects in the hierarchy.¦ The structure is dynamic and can have any level of complexity: for example,using the Composite view from the J2EE Patterns Catalog, which is usefulfor portal applications.
Decorator Applicable Scenarios
You want to transparently and dynamically add responsibilities to objectswithout affecting other objects.¦ You want to add responsibilities to an object that you may want to change inthe future.¦ Extending functionality by subclassing is no longer practical
Tuesday, July 10, 2007
Nice article on entity framework.
Nice article on entity framework.
What is entity framework
Teams build software, not developers. Different members of a team think of data differently. For example:
Developers think in class diagrams
Analysts think in OR diagrams
DBAs think in ER diagrams
Is There a Solution?
At the core of the Entity Framework is an Entity Data Model (EDM). The EDM is meant to be the common grammar in which different fiefdoms. The EDM defines a language for describing data without having to describe the storage of that data. On top of the EDM is a set of services that work to enable manipulation of the data in beneficial ways throughout an organization
This is a nice article on server side.com.Follow the link.
http://www.theserverside.net/tt/articles/showarticle.tss?id=IntroducingEntityFramework
Saturday, June 30, 2007
Adapter Variations
// Variations on the Adapter pattern.
package adapter;
import junit.framework.*;
class WhatIHave {
public void g() {}
public void h() {}
}
interface WhatIWant {
void f();
}
class SurrogateAdapter implements WhatIWant {
WhatIHave whatIHave;
public SurrogateAdapter(WhatIHave wih) {
whatIHave = wih;
}
public void f() {
// Implement behavior using
// methods in WhatIHave:
whatIHave.g();
whatIHave.h();
}
}
class WhatIUse {
public void op(WhatIWant wiw) {
wiw.f();
}
}
// Approach 2: build adapter use into op():
class WhatIUse2 extends WhatIUse {
public void op(WhatIHave wih) {
new SurrogateAdapter(wih).f();
}
}
// Approach 3: build adapter into WhatIHave:
class WhatIHave2 extends WhatIHave
implements WhatIWant {
public void f() {
g();
h();
}
}
// Approach 4: use an inner class:
class WhatIHave3 extends WhatIHave {
private class InnerAdapter implements WhatIWant{
public void f() {
g();
h();
}
}
public WhatIWant whatIWant() {
return new InnerAdapter();
}
}
public class AdapterVariations extends TestCase {
WhatIUse whatIUse = new WhatIUse();
WhatIHave whatIHave = new WhatIHave();
WhatIWant adapt= new SurrogateAdapter(whatIHave);
WhatIUse2 whatIUse2 = new WhatIUse2();
WhatIHave2 whatIHave2 = new WhatIHave2();
WhatIHave3 whatIHave3 = new WhatIHave3();
public void test() {
whatIUse.op(adapt);
// Approach 2:
whatIUse2.op(whatIHave);
// Approach 3:
whatIUse.op(whatIHave2);
// Approach 4:
whatIUse.op(whatIHave3.whatIWant());
}
public static void main(String args[]) {
junit.textui.TestRunner.run(AdapterVariations.class);
}
} ///:~
Saturday, May 19, 2007
Design Pattern -Builder Pattern

GOF Creational pattern - Abstract Factory
Go to Sears and order a kitchen make-over. Same order request process can yield very different kitchen drawers, doors and hardware
Provide an interface for creating families of related or dependent objects without specifying their concrete classes
The abstract factory's intent is to provide an interface to use for creating families of related or dependent or dependent objects without actually specifying their concrete classes. For a given set of related abstract classes, this pattern supplies a technique for creating instances of those abstract classes from an equivalent set of concrete subclasses. On some occasions, you may need to create an object without having to know which concrete subclass of object to create.
The abstract factory pattern is also know as Kit.
Benefits
It isolates client from concrete classes.
It eases the exchanging of object families
It promotes consistency among objects
The base GOF patterns are divided into 3 types
Creational
Structural
Behavioral
The Abstract factory pattren come under the creational patterns
J2EE Applicability of Abstract Factory
DAO
Value Object Assembler
Thursday, April 26, 2007
To find Number of pages in word document Programatically
ActiveDocument.ComputeStatistics(wdStatisticPages,1)
This gives you the number of pages in the word document
Hope this helps
Sunday, January 21, 2007
Java Bean Generator from Database table
I have written a small utility to generate the java bean classes from exiting tables whihc are present in the database.
You can gerenarate your bean class/Model classes with a click of button.
Hope this helps you
Create a from in VB and keep one text boxes and list box places two command buttons
Here is code
Dim conn As ADODB.Connection
Private Sub CommandButton1_Click()Set conn = New ADODB.Connectionconn.Open "xxxx", "xxxx", "xxxx"Dim arr As ADODB.Recordsetconn.CursorLocation = adUseClientSet arr = New ADODB.Recordsetarr.Open "select TNAME from tab", conn, adOpenDynamic, adLockOptimisticDo While Not arr.EOF ListBox1.AddItem (arr.Fields(0)) arr.MoveNextLooparr.Close
End Sub
Private Sub CommandButton2_Click()Dim arr As ADODB.RecordsetDim strValue As StringDim strClassName As StringIf (conn Is Nothing) Then MsgBox "get the tables first", vbCritical Exit SubEnd IfSet arr = New ADODB.RecordsetstrClassName = Replace(ListBox1.Text, "_", "")strValue = "public class " & StrConv(strClassName, vbProperCase) & "{" & vbCrLf
arr.Open "select * " & "from " & ListBox1.Text, conn, adOpenDynamic, adLockOptimisticFor i = 0 To arr.Fields.Count - 1 Select Case arr.Fields(i).Type Case adNumeric, adInteger, adSingle, 139 strValue = strValue + "private int " & Replace(StrConv(arr.Fields(i).Name, vbLowerCase), "_", "") & ";" + Chr(13) Case adVarChar strValue = strValue + "private String " & StrConv(Replace(arr.Fields(i).Name, "_", ""), vbLowerCase) + ";" + Chr(13) End SelectNextstrValue = strValue & "}"TextBox1.Text = strValuearr.Close
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Terminate()If Not (conn Is Nothing) Thenconn.CloseEnd IfEnd Sub
Raj
Sunday, December 31, 2006
My blog migrated to New Blogger
Hope you like my upgrade to new blogger. It has lots of features which you make use of.



