Posts

matlab - How to unblend two images from a blend image -

I have added 2 images with this code to IMAGA1 and IMG2 which is doing okay. I want to know Find out how the original two images get img1 and img2 The code for the mix is ​​ img1 = imread ('C: \ MATLAB7 \ Picture5.jpg'); Img2 = imread ('C: \ MATLAB7 \ Picture6.jpg'); For I = 1: size for Jammu = 1 (img1,1): size for k = 1 (img1,2): size (img1,3) output (i, j, k) = (img1 (i, J, k)) + img2 (i, j, k)) / 2; End and Emasho (Output, [0 255]); If you had an original image and mixed image, you can recover the second image If you have only mixed image then there are endless numbers of img1 and img2 which can be added to create two images. So you can not recover them. For future matlab programming, note that you do not need those lips in matlab which you have written, this is similar to the code you provided: img1 = imread ('C: \ MATLAB7 \ Picture5.jpg'); Img2 = imread ('C: \ MATLAB7 \ Picture6.jpg'); Output = (IMG1 + IMG2) ./2; Imshow (outp...

numpy - displaying a colored 2d array in matplotlib in Python -

I want to plot 2-D matrix from numpy as a color matrix in Matplotlib. I have 9-B-9 array: my_array = diag (wal (9)) # conspiracy gangster pcolor (my_array) I To have a certain color, want to set the first three elements of the diagonal, the next three have a different color, and the last three different colors I want to specify the color by the hex code string, such as "#FF8C00" how can I do this Am I Also, how can I set the color of 0-valuable elements for pcolor? To put the elements in different colors, give them different values: Imported listed matplotlib.colors from Articles, Noon Serial = Listed columns (['# E0E0E0', '# FF8C00', '# 8c00FF', '# 00FF8C']) Panic (my_array , Cmap = cmap, norm = noNorm ()) ideal = any () logic matrix avoids any scaling of values, so that in the list The first Color, 1 second, etc.

.net - How do I specify a wildcard (for ANY character) in a c# regex statement? -

The web page is trying to use a wildcard in C # to get information from the source, but I do not know how to use it in the form. Wildcard Characters I did not try to do anything! Wildcards need to be allowed only for numbers, but as the page is generated the same every time, I can also allow any characters. > Regex statement in use: Regex guestbookWidgetIDregex = new Regex ("GuestbookWidget ('INSERT wildcard here', '(* *.)', 500);", If someone can understand what I am doing, then it will be highly appreciated! Post text "itemprop =" text " > Wildc The word is . . To match the arbitrary number in any number, use . * (which means zero or more . ) or . + (Which means one or more . ) Note that you need to avoid your brackets \\ ( and \\) . (Or \ ( and \) one @ " " in the string)

linux - How do I find the current virtual terminal -

I am working on a problem in Ubuntu 10.04, where after the resume, the mouse cursor is missing goes. This can be "Fixed" by running chvt 1; However, the X console is not always vt # 7, so code> 7 7 is wrong in those cases . What I would like to do is, find the current VT in the fix-up script and make sure that I will revert back to that VT. / P> How can I get the current VT? (TTI (1) only reports "no TTI") check that 'fgconsole' is what Does it need Seems to work for me (e.g., return 7 and I'm currently in x)

How to track my dynamic IP address,is there an API available or other tools? -

Does anyone know a device or better API to track my dynamic IP address? Thanks a lot for your help. Yours, gender If you use managed APIs, then you To monitor the IP address change, you can use the NotifyIpInterfaceChange (see) or NotifyAddrChange (see) API for a local computer.

java - Formula to draw pyramid of circles -

I am trying to create a pyramid of circles in my game, looking for this type: But I can not print it properly. I'm constantly growing really weird, but nothing close to this. Can anyone give me some tips on the appropriate formula? My window is 600x600, the base of the pyramid is 8. field = new field [base * (base / 2) +4]; Int line_count = base; Int line_tmp = line_count; (For ([i] = new field (0, (150+ (line_tmp * 5)) for (int i = 0; i & lt; field lamps; i ++) {for (int j = line_tmp; j & Lt;), (600 + line_tmp * 5));} linemount -; line_tmp = linemount; I see that there are errors: Wrong array size formula. y expression in line_tmp (which looks like your counter counter). having two variables, line_count and line_temp that are always equal Instead of counting by line, your external loop calculation by node. Usually meaningless variable names and magical numbers are scattered about. // I use java.util.ArrayList because its add method...

C# problem with ADO -

When I use the following code, I get this error: "Enter the statement in the OleDbexception syntax error plz help me! {// new user name system.Data.OleDb.OleDbCommandBuilder cb; cb = new system. Data.OleDb.OleDbCommandBuilder ( Da); DataRow DRow = cPD_DatabaseDataSet.Tables ["users_table"]. NewRow (); dRow [0] = this.textBox_add_user.Text; dRow [1] = this.textBox_password.Text; cPD_DatabaseDataSet.Tables ["users_table"] Rows Add (DRow); // add new record cb.GetUpdateCommand (); cb.GetInsertCommand (); // access file da.Update (cPD_DatabaseDataSet, "users_table"); // Save new recode; Clear textboxes.Textbox_add_user.Text = ""; This.textBox_password.Text = ""; This.textBox_re_password.Text = "";}; hold (System.Data.OleDb.OleDbException exp) {// Connection Close this.con.Close (); MessageBox.Show (exp.ToString ());} ` If you can get a string that represents the inserted statement, then it may be sued, it is q...