Re: Continuous function, solve an equation and 2D image
- To: mathgroup at smc.vnet.net
- Subject: [mg94400] Re: Continuous function, solve an equation and 2D image
- From: rameshbog at gmail.com
- Date: Fri, 12 Dec 2008 06:53:09 -0500 (EST)
- References: <ghnfir$nlf$1@smc.vnet.net> <gho4ls$vr$1@smc.vnet.net>
On Dec 10, 11:12 am, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de> wrote: > Hi, > > NSolve[ > ( i - a ) + ( j - b ) + ( ImageA[[i,j]] - ImageFunction[x][y] ) <= = 1, > {a,b} ] > > is *one* inequality for *two* variables {a,b}. There are either no > or an infinite number of solutions. x and y are not used in the whole > loop construction and it is unclear what you mean. > > It would be better to describe what you wish to do and for what it is > good for. Because the most of us would give you an solution without > For[] loops and unsolvable equations. > > Regards > Jens Hi, Very many thanks for your extremely prompt reply. Sorry; I was not quite clear about what I wanted - i was trying to be brief. Actually I was thinking of replacement of a pixel values in an image. It should replace only when it finds a solution to the equation [( i - a ) + ( j - b ) + (pixel values of ImageA - pixel values of ImageB ) <= 1]. For example: In ImageA, if the position of a pixel is (2,5) and its intensity value is 100. substiting this information in the above equation [( 2 - a ) + ( 5 - b ) + (100 - pixel values of ImageB ) <= 1]. Then solve for ' a ' and ' b '. if there is any solution then the pixel(2,5) intensity should be changed to ' 0 ' otherwise ' 1'. My ultimate goal is 1). to check the each pixel of imageA whether it satisfies the equation with the imageB. 2). Count how many pixels (ImageA) satisfied the equation. thanks again for your precious time Ram